[SciPy-dev] Now new svn of numpy is ready
Arnd Baecker
arnd.baecker at web.de
Thu Jan 5 02:27:33 EST 2006
On Wed, 4 Jan 2006, Travis Oliphant wrote:
>
> My previous post was pre-mature as the fixed numpy was only in the numpy
> branch. I have now finished *merging* the changes from the numpy
> branch into the trunk so
>
> svn co http://svn.scipy.org/svn/numpy/trunk numpy
>
> should not only check out something that compiles and installs *but
> also* intalls into the numpy namespace
>
> so that running in python
>
> >>> import numpy
> >>> numpy.test(1,1)
>
> should work.
First many thanks for your hard work! Looks very good,
just a minor problem:
On the Opteron I get:
======================================================================
ERROR: check_basic (numpy.core.defmatrix.test_defmatrix.test_algebra)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/abaecker/BUILDS3/Build_113/inst_numpy/lib/python2.4/site-packages/numpy/core/tests/test_defmatrix.py",
l ine 108, in check_basic
Ainv = linalg.inv(A)
File "/scr/python/lib/python2.4/site-packages/scipy/linalg/basic.py",
line 176, in inv
a1 = asarray_chkfinite(a)
File
"/scr/python/lib/python2.4/site-packages/scipy_base/function_base.py",
line 27, in asarray_chkfinite
if not all(_nx.isfinite(x)):
TypeError: function not supported for these types, and can't coerce to
supported types
======================================================================
ERROR: check_basic (numpy.core.defmatrix.test_defmatrix.test_properties)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/home/abaecker/BUILDS3/Build_113/inst_numpy/lib/python2.4/site-packages/numpy/core/tests/test_defmatrix.py",
l ine 34, in check_basic
assert allclose(linalg.inv(A), mA.I)
File "/scr/python/lib/python2.4/site-packages/scipy/linalg/basic.py",
line 176, in inv
a1 = asarray_chkfinite(a)
File
"/scr/python/lib/python2.4/site-packages/scipy_base/function_base.py",
line 27, in asarray_chkfinite
if not all(_nx.isfinite(x)):
TypeError: function not supported for these types, and can't coerce to
supported types
----------------------------------------------------------------------
Ran 176 tests in 0.206s
Clearly, it picks some previously installed scipy_base
(from a separate, old install).
Explicitely:
In [1]: from numpy import *
In [2]: A = array([[1., 2.],[3., 4.]])
In [3]: type(A)
Out[3]: <type 'numpy.ndarray'>
In [4]: A.itemsize
Out[4]: 8
In [5]: A.dtype()
Out[5]: 0.0
In [6]: A.dtypestr
Out[6]: '<f8'
In [7]: linalg.inv(A)
---------------------------------------------------------------------------
exceptions.TypeError Traceback (most
recent call last)
/home/abaecker/BUILDS3/<console>
/scr/python/lib/python2.4/site-packages/scipy/linalg/basic.py in inv(a,
overwrite_a)
174 Return inverse of square matrix a.
175 """
--> 176 a1 = asarray_chkfinite(a)
177 if len(a1.shape) != 2 or a1.shape[0] != a1.shape[1]:
178 raise ValueError, 'expected square matrix'
/scr/python/lib/python2.4/site-packages/scipy_base/function_base.py in
asarray_chkfinite(x)
25 """
26 x = asarray(x)
---> 27 if not all(_nx.isfinite(x)):
28 raise ValueError, "Array must not contain infs or nans."
29 return x
TypeError: function not supported for these types, and can't coerce to
supported types
In [8]: import numpy
In [9]: numpy.__version__
Out[9]: '0.9.2.1812'
Many thanks, Arnd
More information about the SciPy-Dev
mailing list