vcs icon indicating copy to clipboard operation
vcs copied to clipboard

Update the docstring for vector method (2.8.0)

Open jypeter opened this issue 7 years ago • 2 comments

The docstring of the vectors is out of date

  • the scaletype and scalerange parameters are not described in the docstring and I wonder what they do, or how they interact with scale and reference
reference =  1e+20
scaletype =  constantNNormalize
scalerange =  [0.1, 1.0]
  • the values specified for type in docstring are not allowed (or maybe the docstring is ambiguous?). I have not checked the other parameters. Besides, changing the value of type does not seem to do anything (#185)
 |              # Same as vc.type='arrow head'
 |              vc.type=0
 |              # Same as vc.type='wind barbs'
 |              vc.type=1
 |              # Same as vc.type='solid arrow head'
 |              vc.type=2
>>> vect_gm.type = 'arrow head'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/share/unix_files/cdat/miniconda2/envs/cdatm14/lib/python2.7/site-packages/vcs/vector.py", line 629, in _settype
    value = VCS_validation_functions.checkVectorType(self, 'type', value)
  File "/home/share/unix_files/cdat/miniconda2/envs/cdatm14/lib/python2.7/site-packages/vcs/VCS_validation_functions.py", line 868, in checkVectorType
    ' can either be ("arrows", "barbs", "solidarrows") or (0, 1, 2).')
  File "/home/share/unix_files/cdat/miniconda2/envs/cdatm14/lib/python2.7/site-packages/vcs/VCS_validation_functions.py", line 59, in checkedRaise
    raise ex(err)
ValueError: The type can either be ("arrows", "barbs", "solidarrows") or (0, 1, 2).

jypeter avatar Apr 27 '17 12:04 jypeter