[Numpy-discussion] What is Numeric3 anyway?

Michiel Jan Laurens de Hoon mdehoon at ims.u-tokyo.ac.jp
Sat Mar 26 21:33:04 EST 2005

I'm a bit confused about where Numeric3 is heading. Originally, the idea was 
that Numeric3 should go in Python core. Are we still aiming for that? More 
recently, another goal was to integrate Numeric and numarray, which I fully 
support. However, from looking at the Numeric3 source code, and from looking at 
the errors found by Arnd, it looks like that Numeric3 is a complete rewrite of 
Numeric. This goes well beyond integrating Numeric and numarray. Now I realize 
that sometimes it is necessary to rethink and rewrite some code. However, 
Numerical Python has served us very well over the years, and I'm worried that 
rewriting the whole thing will break more than it fixes. So where is Numeric3 going?


Arnd Baecker wrote:

> Hi Travis,
> On Fri, 25 Mar 2005, Travis Oliphant wrote:
>>To all who were waiting:
>>I've finished adding the methods to the array object so that Numeric3 in
>>CVS now compiles (at least for me on Linux).
> Compilation is fine for me as well (linux).
> I played around a bit -
> Obviously, addition of arrays, multiplication etc. don't work
> yet (as expected, if I remember your mails correctly).
> One thing which confused me is the following
> In [1]:from ndarray import *
> In [2]:x=arange(10.0)
> In [3]:scalar=x[3]
> In [4]:print scalar+1
> ---------------------------------------------------------------------------
> exceptions.TypeError                 Traceback (most recent call last)
> TypeError: unsupported operand type(s) for +: 'double_arrtype' and 'int'
> In [5]:print type(scalar)
> <type 'double_arrtype'>
> OK, this has been discussed up-and-down on this mailing
> list. At the moment I don't know how this
> will affect my Numeric(3) life, so I will wait
> until the other operations are implemented
> and see if there are any consequences
> for my programs at all ... ;-)
> A couple of things seem to be a bit unusual, e.g.:
> In [9]:x=arange(10.0)
> In [10]:x
> Out[10]:array([0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0], 'd')
> In [11]:x.argmax()
> ---------------------------------------------------------------------------
> exceptions.TypeError                                 Traceback (most
> recent call last)
> /home/scratch/abaecker/INSTALL_SOFT/TEST_NUMERIC3/<console>
> TypeError: function takes exactly 1 argument (0 given)
> In [12]:x.argmax(None)
> Out[12]:9
> In [13]:t=x.argmax(None)
> In [14]:type(t)
> Out[14]:<type 'int_arrtype'>
> So argmax also returns an array type, but I would
> have really thought that this is an integer index?!
> Also a couple of attributes (E.g. x.sum() are not yet
> implemented) or lack documention (I know this comes last ;-).
> Best,
> Arnd
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639

More information about the NumPy-Discussion mailing list