numeric/numpy/numarray

B

Bryan

hi,

what is the difference among numeric, numpy and numarray? i'm going to start
using matplotlib soon and i'm not sure which one i should use.


this page says, "Numarray is a re-implementation of an older Python array module
called Numeric"
http://www.stsci.edu/resources/software_hardware/numarray

this page says, "NumPy derives from the old Numeric code base and can be used as
a replacement for Numeric."
http://numeric.scipy.org/

i looked at the matplotlib examples today and if i remember correctly, the
examples didn't use numarray.

so i'm a bit confused.

thanks,

bryan
 
S

Simon Percivall

Bryan said:
hi,

what is the difference among numeric, numpy and numarray? i'm going to start
using matplotlib soon and i'm not sure which one i should use.


this page says, "Numarray is a re-implementation of an older Python array module
called Numeric"
http://www.stsci.edu/resources/software_hardware/numarray

this page says, "NumPy derives from the old Numeric code base and can be used as
a replacement for Numeric."
http://numeric.scipy.org/

i looked at the matplotlib examples today and if i remember correctly, the
examples didn't use numarray.

so i'm a bit confused.

thanks,

bryan

Look again at numeric.scipy.org, and this time: read the whole page,
especially the section called "Older Array Packages".
 
B

Ben Sizer

Simon said:
Look again at numeric.scipy.org, and this time: read the whole page,
especially the section called "Older Array Packages".

In particular, ignore any references to SciPy Core... Not to mention
anything regarding older NumPy, which is nothing to do with newer
NumPy, which is why common libraries (such as PyOpenGL) ask for NumPy
v23 when the latest download on SourceForge is 0.9.8.

Numeric libraries in Python are a nomenclatural nightmare. It's well
past time that something made it into the standard library, I feel.
 
B

Bryan

Simon said:
Look again at numeric.scipy.org, and this time: read the whole page,
especially the section called "Older Array Packages".

at the end of that page, it says:

"Numarray is another implementation of an arrayobject for Python written after
Numeric and before NumPy. Sponsors of numarray have indicated they will be
moving to NumPy as soon as is feasible for them so that eventually numarray will
be phased out."


on the python wiki
"NumArray is the current reimplementation of NumPy."
http://wiki.python.org/moin/NumArray

so, was Numarray written *before* NumPY, or was it a reimplementation of NumPy
which implies it came *after* NumPy? it seems clear that Numeric is the old one
and i read is not being worked on anymore. so that leaves Numarray and numpy.
which of these two should i use?

thanks,

bryan
 
B

Ben Sizer

Bryan said:
at the end of that page, it says:

"Numarray is another implementation of an arrayobject for Python written after
Numeric and before NumPy. Sponsors of numarray have indicated they will be
moving to NumPy as soon as is feasible for them so that eventually numarray will
be phased out."


on the python wiki
"NumArray is the current reimplementation of NumPy."
http://wiki.python.org/moin/NumArray

so, was Numarray written *before* NumPY, or was it a reimplementation of NumPy
which implies it came *after* NumPy? it seems clear that Numeric is the old one
and i read is not being worked on anymore. so that leaves Numarray and numpy.
which of these two should i use?

Bryan,

NumPy is the name of both an old package and a new package. I believe
that NumArray came after the first incarnation, but that the new
incarnation of NumPy is the most recent, and is probably the one you
want.
 
J

John Hunter

Bryan> hi, what is the difference among numeric, numpy and
Bryan> numarray? i'm going to start using matplotlib soon and i'm
Bryan> not sure which one i should use.

numpy is the successor to numarray and Numeric. All three do
basically the same thing. You should use numpy.

matplotlib works with all three, you just need to be sure to set your
"numerix" setting to "numpy" in your matplotlibrc file.

numerix : numpy # numpy, Numeric or numarray

On unix like OSes, this file is placed in ~/.matplotlib. On windows
systems, it is usually found in C:\Documents and
Settings\yourname\.matplotlib

JDH
 
B

Bryan

Ben said:
Bryan,

NumPy is the name of both an old package and a new package. I believe
that NumArray came after the first incarnation, but that the new
incarnation of NumPy is the most recent, and is probably the one you
want.

thanks ben,

i'll use NumPy then. just wish it was clear and obvious which one to use so i
wouldn't have had to ask this question here.

bryan
 
D

Dan Christensen

Bryan said:
on the python wiki
"NumArray is the current reimplementation of NumPy."
http://wiki.python.org/moin/NumArray

so, was Numarray written *before* NumPY, or was it a reimplementation of NumPy
which implies it came *after* NumPy?

I clarified that wiki page to use the name "Numeric" for the old
version, and to point out that there is "Numpy" which is even newer
than numarray.

Dan
 
A

Alex Martelli

Bryan said:
so, was Numarray written *before* NumPY, or was it a reimplementation of
NumPy which implies it came *after* NumPy? it seems clear that Numeric is
the old one and i read is not being worked on anymore. so that leaves
Numarray and numpy. which of these two should i use?

I'll voice a heretic thought: me, I'm sticking with good old Numeric
until the situation with the newer packages settles down. Yes, Numeric
is not being developed any more, but to me that also means it won't
"change under me" and break something... and, it serves my personal
computational needs until something equally stable finally arrives. (Of
course, if and when I hit some bug in Numeric that will never be solved,
or need some other add-on package which in turn demands a different
numeric-array-computation underpinning, I'll have to change, but, so
far, I have not found myself in either of these situations).


Alex
 
T

Terry Reedy

Alex Martelli said:
I'll voice a heretic thought: me, I'm sticking with good old Numeric
until the situation with the newer packages settles down.

Not much of a heresy, I think. The numpy site recommends that *new* users
start with numpy but I don't remember the numeric/numpy folks recommending
that happy, experienced numeric users dump it yet. The current development
version of numpy is still labelled as a development version (0.9.8, I
believe) and besides bug fixes, it still made a few tweeks in the user
interface and C-API from the previous version. They are aiming to release
a stable NumPy 1.0 by the end of the summer. Then maybe they will start
pushing it, along with a compatible array interface for Python.

Terry Jan Reedy
 
R

Robert Kern

Terry said:
Not much of a heresy, I think. The numpy site recommends that *new* users
start with numpy but I don't remember the numeric/numpy folks recommending
that happy, experienced numeric users dump it yet. The current development
version of numpy is still labelled as a development version (0.9.8, I
believe) and besides bug fixes, it still made a few tweeks in the user
interface and C-API from the previous version. They are aiming to release
a stable NumPy 1.0 by the end of the summer. Then maybe they will start
pushing it, along with a compatible array interface for Python.

My tactic in answering Numeric questions on this list has been to give the numpy
answer if the asker seems new to the field and give the Numeric answer *and* the
(obviously superior) numpy answer otherwise.

But that's mostly my natural politeness and tact (quit laughing. I can hear you
sniggering back there!). We definitely *do* want old hands at Numeric to give
numpy a try now. It's difficult to find the bugs, work out the transition
headaches, and make the right design decisions without feedback from you.

We are trying to get out a 1.0b1 in a couple of weeks. Hopefully, we can get to
1.0b2 by the SciPy conference in mid-August. If you've been holding off on
trying numpy, the 1.0 betas will be the perfect time to jump in. It will also be
your last chance to get your 2 cents in.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top