Ryan May wrote:
> Ok, my debugging tells me the problem comes down to the units support,
> specifically this code starting at line 130 in units.py:
>
> if converter is None and iterable(x):
> # if this is anything but an object array, we'll assume
> # there are no custom units
> if isinstance(x, np.ndarray) and x.dtype != np.object:
> return None
>
> for thisx in x:
> converter = self.get_converter( thisx )
> return converter
>
> Because a string is iterable, and even a single character is considered
> iterable,
> this code recurses forever. I can think this can be solved by, in addition to
> the iterable() check, make sure that x is not string like. If it is, this
> will
Doing this check makes sense.
> return None as the converter. Somehow, this actually will then plot properly.
> I'm still trying to run down why this works, but I'm running out of time for
> the
> day. I will say that the data set for the line2D object is indeed a masked
> array
> of dtype ('|S4').
>
> Anyone object to adding the check?
>
> In addition, why are we looping over thisx in x but returning inside the loop?
> Wouldn't this *always* be the same as x[0]?
>
The idea is to base the converter selection on the first item instead of
checking every item, which would be very slow.
> Ryan
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel