[Numpy-discussion] minimal numpy ?
Robert
kxroberto@googlemail....
Mon May 11 17:22:22 CDT 2009
for use in binary distribution where I need only basics and fast
startup/low memory footprint, I try to isolate the minimal ndarray
type and what I need..
with "import numpy" or "import numpy.core.multiarray" almost the
whole numpy package tree is imported, _dotblas etc.
cxFreeze produces some 10MB numpy baggage (4MB zipped)
yet when copying and using the multiarray DLL only, I can create
arrays, but he most things fail:
>>> import multiarray
>>> x=multiarray.array([5,6])
>>> x+x
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
TypeError: unsupported operand type(s) for +: 'numpy.ndarray' and
'numpy.ndarray'
while this works:
>>> b=numpy.core.multiarray.array([3,9])
>>> b+b
array([ 6, 18])
I added some things from core.__init__.py like this:
import umath
import _internal # for freeze programs
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
..
but the problem of failed type self-recognition remains.
What is this? What to do?
More information about the Numpy-discussion
mailing list