numarray, numpy, numeric, numerix, scipy,...

Hi all

I'm having a bit of trouble making sense of all the different numeric-array libraries that Matplotlib uses and allows. We're using Matplotlib as part of a larger application, and I want to make sure we use the best combination of libraries.

Is it a case of 'whichever you like' or is one of the numeric-array libraries clearly better and more stable than the others?

Also, what is Scipy doing these days? Is matplotlib still buried away inside it, as I believe it was, or have they switched to another plotting library altogether? I saw something about 'dynamic plots' but I wasn't sure it was at stable or development stage.

Finally, from the documentation of Matplotlib, I got the impression that it would 'sniff out' and find a suitable numeric-array library. Instead it seems that it only tries to include one ('numeric' as I recall), and if you want to use any other one it won't try for it, you have to manually tell it so using something like the following. Would some automated attempt to load the numeric-array libraries, in order of most preferred to least preferred, be appropriate in the matplotlib code?

import matplotlib
import numarray
matplotlib.rcParams['numerix'] = 'numarray' import pylab

If I want to "back the winning horse" here, which numeric library should I tell the users of our software to install?

Cheers
JP

···

--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/

Hi John,

John Pye wrote:

Hi all

I'm having a bit of trouble making sense of all the different numeric-array libraries that Matplotlib uses and allows. We're using Matplotlib as part of a larger application, and I want to make sure we use the best combination of libraries.

Is it a case of 'whichever you like' or is one of the numeric-array libraries clearly better and more stable than the others?

They're all very stable, but I believe Numeric is explicitly not being supported anymore and numarray will probably eventually stop being supported in favour of numpy. numpy is very stable now, so my advice it to use numpy. This is an easier decision now than it was a few months ago since numpy will soon hit its 1.0 release. One post on this or the developer list suggested that Numeric and numarray support will eventually be removed from Matplotlib, but I think we are talking way off in the future for that.

Also, what is Scipy doing these days? Is matplotlib still buried away inside it, as I believe it was, or have they switched to another plotting library altogether? I saw something about 'dynamic plots' but I wasn't sure it was at stable or development stage.

Matplotlib was never a part of scipy. You may be thinking of gplt or xplt (from memory). Matplotlib remains completely separate from scipy but requires one of Numeric, numarray or numpy - your choice.

Finally, from the documentation of Matplotlib, I got the impression that it would 'sniff out' and find a suitable numeric-array library. Instead it seems that it only tries to include one ('numeric' as I recall), and if you want to use any other one it won't try for it, you have to manually tell it so using something like the following. Would some automated attempt to load the numeric-array libraries, in order of most preferred to least preferred, be appropriate in the matplotlib code?

You're right; it doesn't sniff out the package you want, although I think it would be nice if it did. However, this will soon be unimportant because everyone will be using numpy and that will become the default.

import matplotlib
import numarray
matplotlib.rcParams['numerix'] = 'numarray' import pylab

If I want to "back the winning horse" here, which numeric library should I tell the users of our software to install?

Cheers
JP

Makybe Diva = numpy

i.e. it's a one horse race.

Gary

just set
numerix : numpy
in your matplotlibrc and all will be happy.

Ryan

···

On 4/17/06, Gary Ruben <gruben@...636...> wrote:

Hi John,

John Pye wrote:
> Hi all
>
> I'm having a bit of trouble making sense of all the different
> numeric-array libraries that Matplotlib uses and allows. We're using
> Matplotlib as part of a larger application, and I want to make sure we
> use the best combination of libraries.
>
> Is it a case of 'whichever you like' or is one of the numeric-array
> libraries clearly better and more stable than the others?

They're all very stable, but I believe Numeric is explicitly not being
supported anymore and numarray will probably eventually stop being
supported in favour of numpy. numpy is very stable now, so my advice it
to use numpy. This is an easier decision now than it was a few months
ago since numpy will soon hit its 1.0 release. One post on this or the
developer list suggested that Numeric and numarray support will
eventually be removed from Matplotlib, but I think we are talking way
off in the future for that.

> Also, what is Scipy doing these days? Is matplotlib still buried away
> inside it, as I believe it was, or have they switched to another
> plotting library altogether? I saw something about 'dynamic plots' but I
> wasn't sure it was at stable or development stage.

Matplotlib was never a part of scipy. You may be thinking of gplt or
xplt (from memory). Matplotlib remains completely separate from scipy
but requires one of Numeric, numarray or numpy - your choice.

> Finally, from the documentation of Matplotlib, I got the impression that
> it would 'sniff out' and find a suitable numeric-array library. Instead
> it seems that it only tries to include one ('numeric' as I recall), and
> if you want to use any other one it won't try for it, you have to
> manually tell it so using something like the following. Would some
> automated attempt to load the numeric-array libraries, in order of most
> preferred to least preferred, be appropriate in the matplotlib code?

You're right; it doesn't sniff out the package you want, although I
think it would be nice if it did. However, this will soon be unimportant
because everyone will be using numpy and that will become the default.

> import matplotlib
> import numarray
> matplotlib.rcParams['numerix'] = 'numarray' import pylab
>
> If I want to "back the winning horse" here, which numeric library should
> I tell the users of our software to install?
>
> Cheers
> JP

Makybe Diva = numpy

i.e. it's a one horse race.

Gary

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I don't have one and I don't think it's good design for my software installer to go creating one for people as part of a larger software installation. I think that sniffing would be a better (complementary, not replacement) solution, so that whichever the user decides to install, it just works.

For now I will select numpy. Is that the one that Matplotlib looks for first?

Ryan Krauss wrote:

···

just set
numerix : numpy
in your matplotlibrc and all will be happy.

--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/