> I try 'vline_demo' in directory 'example' and I have
> problem with vlines ... error : "rank-O array has no
> length". I try also with hlines and I have the same
> problem ...
> I also this error with all the demo : error reading
> package index file C:/Python23/tcl/tix8.1/pkgIndex.tcl:
> invalid command name "lt}]}"
> Have you a explanation ?
This turns out to be numarray specific - most of my tests use Numeric
which is why I didn't catch that. I'll try and make sure I do a
numarray specific test in the future. Todd, perhaps you should also
make a note to run backend_driver on your numarray build, at least for
Agg. That wouldn't have helped this time, because vline_demo.py was
not in the regression suite, but I've added it.
Now on to your problem. This is caused by a difference in how Numeric
and numarray treak rank 0 arrays
>>> from Numeric import asarray
>>> from numarray import asarray
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ValueError: Rank-0 array has no length.
I don't know why there is this difference but I'm sure Todd or Perry
can comment at length :-).
To solve your vline problem, you need to make the vmin and vmax args
of vlines (or hlines) iterable. Ie
vlines(t, 0, s, color='k')
vlines(t, , s, color='k')
Should work! Thanks for letting us know.