[BioPython] Do you mean Numpy or Numeric?
Peter
biopython at maubp.freeserve.co.uk
Fri Feb 2 19:00:26 UTC 2007
Wolfgang Meyer wrote:
> Hi,
>
> I read the previous posts about numpy / numeric confusions. I were also
> stumbled by it very much and wanted some issues to be clarified.
>
> In the documentation for BioPython on web, many input/output arrays
> are specified as "Numpy arrays". However, I think it should be "Numeric
> arrays".
>
> ...
>
> Why? Because the function is expecting a Numeric array,
> rather than Numpy array, which is specified in the documentation.
Its because "NumPy" means something different now, than when that was
written (when it meant the Numeric library). See below.
> So why is this the case? I know Numeric is not under development
> anymore, and Numpy is a "new" Numeric.
See: http://www.scipy.org/History_of_SciPy
(1) Numeric
Once upon a time there was a python array and matrix library called
"Numerical Python" which was used with "import Numeric" but was
frequently referred to as simply "NumPy".
(2) numarray
Then there was a new, incompatible, branch NumArray used with "import
numarry" which was much better for large array (but not so good with
small arrays).
(3) numpy
Now developers are working on the third iteration, which ended up being
called "NumPy" and used with "import numpy".
So the term "NumPy" in recent documentation means the third project,
used with "import numpy". BUT in older documentation it is shorthand
for the first project, "Numerical python" used with "import Numeric".
> But according to my
> experiences they are really different in many aspects so far. If one
> mixes them in programs, one can really have a lot headaches.
Mixing the two is a certainly a bad idea :)
> So I suggest to give real instructions in documentation, instead
> of causing more confusions.
Apart from "KDTree.py" are there any other uses of the term "NumPy"
which would be better as "Numeric"?
BioPython will have to move from Numeric to NumPy at some point anyway...
Peter
More information about the Biopython
mailing list