[Numpy-discussion] Conversion numarray/Numeric objects

Aureli Soria Frisch aureli at ipk.fhg.de
Thu Sep 19 09:18:06 EDT 2002


Hi,

I have developed till now all my numerical stuff using Numeric objects.

I want to use some modules using numarray. I have tested some 
conversion functions on Python, e.g.

numarray.array(Numeric_object.tolist())

but it seems to me a bit slow (specially for large arrays as images). 
Is there any more ways of doing this conversion?
Should I write my own conversion in C?
Which advices could you give me in order to make an smoother transition?

Furthermore I found the web site about numarray/Numeric 
incompatibilities very interesting. However I did not understand 
quite well the paragraph:

>Numeric arrays have some public attributes. Numarray arrays
>have none. All changes to an array's state must be made
>through accessor methods. Specifically, Numeric has the following
>attributes:
>
>Numeric        numarray accessor method(s)
>Attribute
>
>shape      --> shape()  (i.e., specify new shape through method arg instead
>of
>                          assigning to shape attribute)
>flat       --> flat()
>real       --> real()   (set capability not implemented yet, but will be)
>imag       --> imag()   (ditto)
>savespace  --> not used, no equivalent functionality (xxx check this)

since interactively typing a.shape() or a.shape((8,8)) raise an 
exception (Tuple object not callable). Am I misunderstanding 
something?

Thanks in advance.
Best regards,
Aureli

-- 
#################################
Aureli Soria Frisch
Fraunhofer IPK
Dept. Pattern Recognition

post: Pascalstr. 8-9, 10587 Berlin, Germany
e-mail: aureli at ipk.fhg.de
fon: +49 30 39006-143
fax: +49 30 3917517
web: http://vision.fhg.de/~aureli/web-aureli_en.html
#################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20020919/c1cacdb3/attachment.html>


More information about the NumPy-Discussion mailing list