Scientific Computing with NumPy

M

mclaugb

Has anyone recompiled the Scientific Computing package using NumPy instead
of Numeric?
I need a least squares algorithm and a Newton Rhaphson algorithm which is
contained in Numeric but all the documentation out there says that Numeric
is crap and all code should be using NumPy.
Thanks,
Bryan
 
L

linda.s

Has anyone recompiled the Scientific Computing package using NumPy instead
of Numeric?
I need a least squares algorithm and a Newton Rhaphson algorithm which is
contained in Numeric but all the documentation out there says that Numeric
is crap and all code should be using NumPy.
Thanks,
Bryan
what is the relationship between Numeric and Numpy?
 
M

mclaugb

This page documents the differences. It seems that NumPy is supported and
more recent.
http://numeric.scipy.org/


Has anyone recompiled the Scientific Computing package using NumPy instead
of Numeric?
I need a least squares algorithm and a Newton Rhaphson algorithm which is
contained in Numeric but all the documentation out there says that Numeric
is crap and all code should be using NumPy.
Thanks,
Bryan
what is the relationship between Numeric and Numpy?
 
B

Brendan

As of version 0.4.x, Scipy exclusively uses the newer NumPy module
instead of the older Numeric module. The confusion is inevitable in
this time of transition, but their intent is to standardize on one
array package.

Brendan
 
M

mclaugb

Is Scipy the same thing as ScientificPython?
I am confused if SciPy is just the new version. they appear to be separate
things.
Bryan
 
T

Travis E. Oliphant

mclaugb said:
Is Scipy the same thing as ScientificPython?

No. They are two separate projects. Scientific Python is still
Numeric-only. SciPy 0.3.x is Numeric-based and SciPy 0.4.x is NumPy-based.

The developers for NumPy are also the developers for SciPy (for the most
part).

There is a mailing list (e-mail address removed) where
all of your questions can be answered.
 
R

Robert Kern

mclaugb said:
Is Scipy the same thing as ScientificPython?
I am confused if SciPy is just the new version. they appear to be separate
things.

They are separate projects.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
R

Robert Kern

mclaugb said:
Has anyone recompiled the Scientific Computing package using NumPy instead
of Numeric?

What "Scientific Computing" package? I don't know of any package under that
name. AFAIK, Konrad Hinsen has not yet ported his ScientificPython package to
numpy, yet.

scipy 0.4+ is ported to numpy (I recommend using an SVN checkout rather than the
tarball).

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
T

Tim Hochberg

mclaugb said:
Is Scipy the same thing as ScientificPython?
I am confused if SciPy is just the new version. they appear to be separate
things.
Bryan

No, Scientific Python is "a collection of Python modules that are useful
for scientific computing" written by Konrad Hinsen. I'm not a user, but
you can find information here:

http://starship.python.net/~hinsen/ScientificPython/

SciPy is, I believe, a more recent and more ambitious project. In any
event it is not directly related to ScientficPython. Information here:

http://scipy.org/

Both of these packages are built on top of one of the three extant array
extensions for Python. To try to clear up some of the confusion around
those, let me summarize the states of these three packages as I
understand it:

Numeric: This is the origingal array package.

Numarray: This was written as a replacement for Numeric. It has improved
performance for large arrays. The internals were also simplified and
many other improvements were made (arrays were subclassable, numeric
signal handling vastly improved, etc). Unfortunately, a side effect of
the changes was that small array performance got worse. There was a
signifigant chunk of the numeric community for whom this was a deal
breaker and as a result there ended up being a split between the Numeric
and Numarray communities.

Numpy: This is a rewrite of Numeric that incorporates most of the
improvements in Numarray. It is designed to bring the two halves of the
Python numeric community back together. So far, it seems to have gotten
a positive reception. It is currently at 0.9.4 and I expect a stable 1.0
version in relatively short order. If I were starting with Python
numerics, this is where I would start, although I've yet to start
converting my Numarray based code over.

I hope that sheds some light on this.

regards,

-tim
 
T

Travis E. Oliphant

Tim said:
mclaugb wrote:


No, Scientific Python is "a collection of Python modules that are useful
for scientific computing" written by Konrad Hinsen. I'm not a user, but
you can find information here:

http://starship.python.net/~hinsen/ScientificPython/

SciPy is, I believe, a more recent and more ambitious project. In any
event it is not directly related to ScientficPython. Information here:

SciPy's been around since 2001. ScientificPython since about 1998, I
think.
Numeric: This is the origingal array package.

Numarray: This was written as a replacement for Numeric. It has improved
performance for large arrays. The internals were also simplified and
many other improvements were made (arrays were subclassable, numeric
signal handling vastly improved, etc). Unfortunately, a side effect of
the changes was that small array performance got worse. There was a
signifigant chunk of the numeric community for whom this was a deal
breaker and as a result there ended up being a split between the Numeric
and Numarray communities.

Just to be clear, small array performance was only 1 of the
"deal-breaker" problems with numarray. Anothber big problem for SciPy
was that the Numeric C-API was never fully supported (in particular the
Ufunc C-API). This made it more difficult to convert to numarray.
Thus, porting never happened. The small-array speed issue just made
porting that much less enticing.
Numpy: This is a rewrite of Numeric that incorporates most of the
improvements in Numarray.

The goal is to incorporate *all* of the improvements (unless being
written in Python is one of the improvements). If there are missing
improvements we need to know about them.


Thanks to Tim for spreading some light on the issue. There will no
doubt be continued confusion for new users over the coming months.
Hopefully, with time the confusion will fade as more people use NumPy
and any remainging issues get resolved.

-Travis
 
R

Robert Kern

linda.s said:
where to download numpy for Python 2.3 in Mac?

I don't think anybody has a binary package compiled for you. However, if you
have gcc installed, numpy should build out-of-box.

$ tar zcf ~/downloads/numpy-0.9.4.tar.gz
$ cd numpy-0.9.4
$ python setup.py build
$ sudo python setup.py install --install-scripts=/usr/local/bin

Note: the sudo in that last command is only necessary if your user account does
not have write access to /usr/local/bin

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
D

David M. Cooke

linda.s said:
where to download numpy for Python 2.3 in Mac?
Thanks!
Linda

I don't know if anybody's specifically compiled for 2.3; I think most
of the developers on mac are using 2.4 :)

But (assuming you have the developer tools installed) it's really to
compile: python setup.py build && python setup.py install.

Do you need Tiger (10.4) or Panther (10.3) compatibility?
 
A

Alex Martelli

David M. Cooke said:
I don't know if anybody's specifically compiled for 2.3; I think most
of the developers on mac are using 2.4 :)

However, what comes with MacOSX is STILL 2.3 (specifically 2.3.5 with
Tiger).


Alex
 
L

linda.s

I don't know if anybody's specifically compiled for 2.3; I think most
of the developers on mac are using 2.4 :)

But (assuming you have the developer tools installed) it's really to
compile: python setup.py build && python setup.py install.

Do you need Tiger (10.4) or Panther (10.3) compatibility?
The confusing thing is python 2.3 comes with mac when you got the
machine. so we need numpy which is OK with python 2.3. is my
understanding right?
Linda
 
T

Tariq

Has anyone been able to successfully install numpy 0.9.4 on python 2.4
under cygwin?

I'm getting a few errors, especially while it installs the C source.
 
R

Robert Kern

Tariq said:
Has anyone been able to successfully install numpy 0.9.4 on python 2.4
under cygwin?

I'm getting a few errors, especially while it installs the C source.

I don't know of anyone compiling numpy under cygwin, but we will be happy to
help you on (e-mail address removed) if you will give us some more
information like what arguments you gave to the setup script and the exact error
messages that you are seeing.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
K

kpp9c

Numeric, Numarray, & Numpy... some one stick a screwdriver in my
forehead and end the madness that Numeric has become.

Brilliant programming & an almost essential part of scientific & math
hacking in python made maddeningly confusing by truly dumb naming
scheme.

For crying all night! Numpy was Numeric's nickname!!... choose a new,
related, but unique name!!!! Holy cow!!! How hard is that? A group of
folks smart enough to come up with such an amazing piece of software
can't do better than to avoid this unnecessary confusion?

only Apple could top naming as retarded as this.

with 2.3 seconds i came up with this:

Nappy

Numeric Array processing in Python

similar enough to suggest its origins, unique enough to not confuse the
heck out of everyone...

I am sure folks can do better, but really!

<wink>
 
T

Terry Reedy

kpp9c said:
Numeric, Numarray, & Numpy... some one stick a screwdriver in my
forehead and end the madness that Numeric has become.
For crying all night! Numpy was Numeric's nickname

Given that NumPy *is* an updated version of Numeric, with the same basic
interface, I think the name quite appropriate. It also works well as a
partner for SciPy.
with 2.3 seconds i came up with this:
Nappy
Numeric Array processing in Python

Nice 8-(). British nanny slang for diaper (napkin).

tjr
 
G

greg.landrum

Terry said:
Given that NumPy *is* an updated version of Numeric, with the same basic
interface, I think the name quite appropriate. It also works well as a
partner for SciPy.

Which, to make the confusion even worse, is *not* the updated version
of Scientific Python.

I'm with the previous author: this naming is a mess.

-greg
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top