<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Conversion numarray/Numeric
objects</title></head><body>
<div>Hi,</div>
<div><br></div>
<div>I have developed till now all my numerical stuff using Numeric
objects.</div>
<div><br></div>
<div>I want to use some modules using numarray. I have tested some
conversion functions on Python, e.g.</div>
<div><br></div>
<div>numarray.array(Numeric_object.tolist())</div>
<div><br></div>
<div>but it seems to me a bit slow (specially for large arrays as
images). Is there any more ways of doing this conversion?</div>
<div>Should I write my own conversion in C?</div>
<div>Which advices could you give me in order to make an smoother
transition?</div>
<div><br></div>
<div>Furthermore I found the web site about numarray/Numeric
incompatibilities very interesting. However I did not understand quite
well the paragraph:</div>
<div><font face="Courier New" size="+1"
color="#000000"><br></font></div>
<blockquote type="cite" cite><font face="Courier New" size="+1"
color="#000000">Numeric arrays have some public attributes. Numarray
arrays<br>
have none. All changes to an array's state must be made<br>
through accessor methods. Specifically, Numeric has the following<br>
attributes:<br>
<br>
Numeric numarray accessor
method(s)<br>
Attribute<br>
<br>
shape --> shape() (i.e.,
specify new shape through method arg instead<br>
of<br>
<span
></span
> <span
></span> assigning to shape attribute)<br>
flat --> flat()<br>
real --> real()
(set capability not implemented yet, but will be)<br>
imag --> imag()
(ditto)</font></blockquote>
<blockquote type="cite" cite><font face="Courier New" size="+1"
color="#000000">savespace --> not used, no equivalent
functionality (xxx check this)</font></blockquote>
<div><font face="Courier New" size="+1"
color="#000000"><br></font></div>
<div><font face="Courier New" size="+1" color="#000000">since
interactively typing a.shape() or a.shape((8,8)) raise an exception
(Tuple object not callable).</font> Am I misunderstanding
something?</div>
<div><br></div>
<div>Thanks in advance.</div>
<div>Best regards,</div>
<div>Aureli</div>
<div><br></div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div>#################################<br>
Aureli Soria Frisch<br>
Fraunhofer IPK<br>
Dept. Pattern Recognition<br>
<br>
post: Pascalstr. 8-9, 10587 Berlin, Germany<br>
e-mail: aureli@ipk.fhg.de<br>
fon: +49 30 39006-143<br>
fax: +49 30 3917517<br>
web: http://vision.fhg.de/~aureli/web-aureli_en.html<br>
#################################</div>
</body>
</html>