matplotlib, numpy, numarray

Hi,

just to tell that the new quiver2 sample are not working with numarray.

/usr/lib/python2.4/site-packages/matplotlib/quiver.py", line 237, in
_make_verts
    scale = nx.amax(a) * math.sqrt(len(a)) # crude auto-scaling
AttributeError: 'module' object has no attribute 'amax'

I think that we will have soon a big problem with the scientific soft in
python. Some of them will use numpy, Numeric or numarray and they will be
totally incompatible. Theorically numpy was to do the reunification but a
transition period must exist. The module Numerix was doing it for matplotlib
but it's beginning to have more and more incompatibility.
The quiver problem is not the only one. I used a lot the griddata module to
interpolate some irregulary spaced data, it was working very fine but it's
not working with numpy and I don't have the skill to change it unfortunatly.

I want to thank you for all the work done for matplotlib, the critics are only
to avoid people to be distressed because one day all their softs won't work
due to numpy/numarray/Numeric incompatibility and stop to use python.

Regards,

N.

humufr@...136... wrote:

I think that we will have soon a big problem with the scientific soft in python. Some of them will use numpy, Numeric or numarray and they will be totally incompatible.

I understand and to some extent share, your frustration, but the problem already existed with Numeric and numarray. Transitioning to numpy is the solution -- not the problem.

> Theorically numpy was to do the reunification but a

transition period must exist.

Yes, it must, and that's where we are now. It is a bit tricky, but once numpy reached 1.0 (soon, I think and hope!), we can all start using it and these problems will fade away....

I want to thank you for all the work done for matplotlib, the critics are only to avoid people to be distressed because one day all their softs won't work due to numpy/numarray/Numeric incompatibility and stop to use python.

well, anyone using Numeric (or numarray), can just keep on using it for a god while. So something that works now should work for a while into the future.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Thanks. There were in fact several points of incompatibility with Numeric and numarray. (Normally I would have checked this, but I slipped up.) I have changed quiver.py and numerix to solve the immediate problem, and to slightly reduce the incidence of such problems in the future. The real solution, of course, will be a complete transition to numpy.

Regarding griddata: I downloaded it a few minutes ago, built it, and tested it with numpy, and it worked fine, at least with the test.py that comes with the package. Looking very quickly at the code, I don't see anything specific to any numeric package; it is using the buffer interface at the C level and matplotlib.numerix at the python level. Perhaps the author, Jeff Whitaker, can shed more light on this question.

Eric

humufr@...136... wrote:

···

    Hi,

just to tell that the new quiver2 sample are not working with numarray.

/usr/lib/python2.4/site-packages/matplotlib/quiver.py", line 237, in _make_verts
    scale = nx.amax(a) * math.sqrt(len(a)) # crude auto-scaling
AttributeError: 'module' object has no attribute 'amax'

I think that we will have soon a big problem with the scientific soft in python. Some of them will use numpy, Numeric or numarray and they will be totally incompatible. Theorically numpy was to do the reunification but a transition period must exist. The module Numerix was doing it for matplotlib but it's beginning to have more and more incompatibility. The quiver problem is not the only one. I used a lot the griddata module to interpolate some irregulary spaced data, it was working very fine but it's not working with numpy and I don't have the skill to change it unfortunatly.

I want to thank you for all the work done for matplotlib, the critics are only to avoid people to be distressed because one day all their softs won't work due to numpy/numarray/Numeric incompatibility and stop to use python.

Regards,

N.

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

"should" but sometimes perhaps it's too hard to do this. One solution, if the
function won't work with anything else than numpy, is to print a
warning/error message for this specific function. That will push people
towards numpy?

N.

···

Le vendredi 9 juin 2006 18:30, Christopher Barker a écrit :

humufr@...136... wrote:

well, anyone using Numeric (or numarray), can just keep on using it for
a god while. So something that works now should work for a while into
the future.

Eric Firing wrote:

Thanks. There were in fact several points of incompatibility with Numeric and numarray. (Normally I would have checked this, but I slipped up.) I have changed quiver.py and numerix to solve the immediate problem, and to slightly reduce the incidence of such problems in the future. The real solution, of course, will be a complete transition to numpy.

Regarding griddata: I downloaded it a few minutes ago, built it, and tested it with numpy, and it worked fine, at least with the test.py that comes with the package. Looking very quickly at the code, I don't see anything specific to any numeric package; it is using the buffer interface at the C level and matplotlib.numerix at the python level. Perhaps the author, Jeff Whitaker, can shed more light on this question.

Eric

Eric is correct - griddata should work with either Numeric/numarray/numpy.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

oki sorry for griddata it was my fault. After the mail on the list, I cleaned
all precedent installation and now it's working fine with numpy...

Thanks,

N.

···

Le samedi 10 juin 2006 13:45, Jeff Whitaker a écrit :

Eric Firing wrote:
> Thanks. There were in fact several points of incompatibility with
> Numeric and numarray. (Normally I would have checked this, but I
> slipped up.) I have changed quiver.py and numerix to solve the
> immediate problem, and to slightly reduce the incidence of such
> problems in the future. The real solution, of course, will be a
> complete transition to numpy.
>
> Regarding griddata: I downloaded it a few minutes ago, built it, and
> tested it with numpy, and it worked fine, at least with the test.py
> that comes with the package. Looking very quickly at the code, I
> don't see anything specific to any numeric package; it is using the
> buffer interface at the C level and matplotlib.numerix at the python
> level. Perhaps the author, Jeff Whitaker, can shed more light on this
> question.
>
> Eric

Eric is correct - griddata should work with either Numeric/numarray/numpy.

-Jeff