![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
Travis, Unfortunately, I cannot confirm your statement.
from scipy.xplt import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 303, in __getattr__ module = self._ppimport_importer() File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/lib/python2.3/site-packages/scipy/xplt/__init__.py", line 12, in ? from Mplot import * File "/usr/lib/python2.3/site-packages/scipy/xplt/Mplot.py", line 1015, in ? import colorbar File "/usr/lib/python2.3/site-packages/scipy/xplt/colorbar.py", line 9, in ? from slice3 import * File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1581, in ? _poly_permutations4 = _construct3 (0) File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1575, in _construct3 mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
scipy.__version__ '0.3.1_287.4326'
Any pointer ? Nils
![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
On Wed, 06 Oct 2004 12:05:52 -0600 Travis Oliphant <oliphant@ee.byu.edu> wrote:
Nils Wagner wrote:
Travis,
Unfortunately, I cannot confirm your statement.
You may need to update Numeric to Numeric 23.5
-Travis
Numeric.__version__ '23.5' from scipy.xplt import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py",
I am already using 23.5 line 303, in __getattr__ module = self._ppimport_importer() File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/lib/python2.3/site-packages/scipy/xplt/__init__.py", line 12, in ? from Mplot import * File "/usr/lib/python2.3/site-packages/scipy/xplt/Mplot.py", line 1015, in ? import colorbar File "/usr/lib/python2.3/site-packages/scipy/xplt/colorbar.py", line 9, in ? from slice3 import * File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1581, in ? _poly_permutations4 = _construct3 (0) File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1575, in _construct3 mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type Can someone reproduce this error ? Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/9b85a909fbfc71a3ea3275c7872e714d.jpg?s=120&d=mm&r=g)
On Wed, 6 Oct 2004, Nils Wagner wrote:
from scipy.xplt import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 303, in __getattr__ module = self._ppimport_importer() File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/lib/python2.3/site-packages/scipy/xplt/__init__.py", line 12, in ? from Mplot import * File "/usr/lib/python2.3/site-packages/scipy/xplt/Mplot.py", line 1015, in ? import colorbar File "/usr/lib/python2.3/site-packages/scipy/xplt/colorbar.py", line 9, in ? from slice3 import * File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1581, in ? _poly_permutations4 = _construct3 (0) File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1575, in _construct3 mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
Can someone reproduce this error ?
Not me. Could you try debugging this error out yourself? E.g. find out what are the actual types of find_mask arguments, etc. Try the following code: mask = find_mask (below, _node_edges3 [itype].astype('i')) Also, check that Numeric is installed properly. Best way to do that is to remove Numeric from your system and re-install it. Make sure that you also remove Numeric header files from the system. Note that when building scipy with one Numeric version and then switching to another Numeric version, then you must also rebuild scipy. Pearu
![](https://secure.gravatar.com/avatar/4d021a1d1319f36ad861ebef0eb5ba44.jpg?s=120&d=mm&r=g)
Pearu Peterson wrote:
On Wed, 6 Oct 2004, Nils Wagner wrote:
from scipy.xplt import *
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 303, in __getattr__ module = self._ppimport_importer() File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/lib/python2.3/site-packages/scipy/xplt/__init__.py", line 12, in ? from Mplot import * File "/usr/lib/python2.3/site-packages/scipy/xplt/Mplot.py", line 1015, in ? import colorbar File "/usr/lib/python2.3/site-packages/scipy/xplt/colorbar.py", line 9, in ? from slice3 import * File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1581, in ? _poly_permutations4 = _construct3 (0) File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1575, in _construct3 mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
Can someone reproduce this error ?
This is the error I was getting before I changed the appropriate functions in arrayfns in Numeric from expecting 'i' type arrays to 'l' type arrays. I suspect you are using an old binary somehow... -Travis
![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
Travis Oliphant wrote:
Pearu Peterson wrote:
On Wed, 6 Oct 2004, Nils Wagner wrote:
from scipy.xplt import *
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 303, in __getattr__ module = self._ppimport_importer() File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/lib/python2.3/site-packages/scipy/xplt/__init__.py", line 12, in ? from Mplot import * File "/usr/lib/python2.3/site-packages/scipy/xplt/Mplot.py", line 1015, in ? import colorbar File "/usr/lib/python2.3/site-packages/scipy/xplt/colorbar.py", line 9, in ? from slice3 import * File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1581, in ? _poly_permutations4 = _construct3 (0) File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1575, in _construct3 mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
Can someone reproduce this error ?
This is the error I was getting before I changed the appropriate functions in arrayfns in Numeric from expecting 'i' type arrays to 'l' type arrays.
I suspect you are using an old binary somehow...
-Travis
I have removed the build directories in scipy and Numeric. Also I have removed Numeric in /usr/lib/python/site-packages Again from scipy.xplt import * failed. I am at a loss for words .... Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/ec366db3649cf13f4061b519193849d6.jpg?s=120&d=mm&r=g)
Nils Wagner wrote:
Travis Oliphant wrote:
Pearu Peterson wrote:
On Wed, 6 Oct 2004, Nils Wagner wrote:
> from scipy.xplt import *
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 303, in __getattr__ module = self._ppimport_importer() File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/lib/python2.3/site-packages/scipy/xplt/__init__.py", line 12, in ? from Mplot import * File "/usr/lib/python2.3/site-packages/scipy/xplt/Mplot.py", line 1015, in ? import colorbar File "/usr/lib/python2.3/site-packages/scipy/xplt/colorbar.py", line 9, in ? from slice3 import * File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1581, in ? _poly_permutations4 = _construct3 (0) File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1575, in _construct3 mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
Can someone reproduce this error ?
This is the error I was getting before I changed the appropriate functions in arrayfns in Numeric from expecting 'i' type arrays to 'l' type arrays.
I suspect you are using an old binary somehow...
-Travis
I have removed the build directories in scipy and Numeric. Also I have removed Numeric in /usr/lib/python/site-packages
Again
from scipy.xplt import *
failed. I am at a loss for words ....
I'm getting the same error on the Mac. Natch. The change in arrayfns.find_mask that you note ('i' to 'l', or PyArray_INT to PyArray_LONG in enum terms) does not appear in the copy of Numeric-23.5 that I downloaded from Sourceforge. Specifically, lines 1118-9 GET_ARR (fsa, fso, PyArray_INT, 2) ; GET_ARR (node_edgesa, node_edgeso, PyArray_INT, 2) ; Travis' change didn't make it into the Numeric-23.5 package. Nils, try checking out a copy of Numeric from CVS. Or just change those two lines to say PyArray_LONG instead of PyArray_INT. -- Robert Kern rkern@ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
Robert Kern wrote:
Nils Wagner wrote:
Travis Oliphant wrote:
Pearu Peterson wrote:
On Wed, 6 Oct 2004, Nils Wagner wrote:
>> from scipy.xplt import * > > > > Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 303, in __getattr__ module = self._ppimport_importer() File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/lib/python2.3/site-packages/scipy/xplt/__init__.py", line 12, in ? from Mplot import * File "/usr/lib/python2.3/site-packages/scipy/xplt/Mplot.py", line 1015, in ? import colorbar File "/usr/lib/python2.3/site-packages/scipy/xplt/colorbar.py", line 9, in ? from slice3 import * File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1581, in ? _poly_permutations4 = _construct3 (0) File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1575, in _construct3 mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
Can someone reproduce this error ?
This is the error I was getting before I changed the appropriate functions in arrayfns in Numeric from expecting 'i' type arrays to 'l' type arrays.
I suspect you are using an old binary somehow...
-Travis
I have removed the build directories in scipy and Numeric. Also I have removed Numeric in /usr/lib/python/site-packages
Again
from scipy.xplt import *
failed. I am at a loss for words ....
I'm getting the same error on the Mac. Natch.
The change in arrayfns.find_mask that you note ('i' to 'l', or PyArray_INT to PyArray_LONG in enum terms) does not appear in the copy of Numeric-23.5 that I downloaded from Sourceforge.
Specifically, lines 1118-9
GET_ARR (fsa, fso, PyArray_INT, 2) ; GET_ARR (node_edgesa, node_edgeso, PyArray_INT, 2) ;
Travis' change didn't make it into the Numeric-23.5 package.
Nils, try checking out a copy of Numeric from CVS. Or just change those two lines to say PyArray_LONG instead of PyArray_INT.
Robert, Thank you very much for your all-dominant hint ! Now, it works fine. However, I didn't mention that I have used the tarball. Obviously, Pearu and all the others are using cvs.... If I use cvs version of Numerical how do I install it ? When is python setup.py build really necessary ? Nils
![](https://secure.gravatar.com/avatar/ec366db3649cf13f4061b519193849d6.jpg?s=120&d=mm&r=g)
Nils Wagner wrote:
If I use cvs version of Numerical how do I install it ?
Same as any source distribution.
When is python setup.py build really necessary ?
When you decide to update the sources. -- Robert Kern rkern@ucsd.edu "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter
![](https://secure.gravatar.com/avatar/9b85a909fbfc71a3ea3275c7872e714d.jpg?s=120&d=mm&r=g)
On Thu, 7 Oct 2004, Nils Wagner wrote:
I suspect you are using an old binary somehow...
-Travis
I have removed the build directories in scipy and Numeric. Also I have removed Numeric in /usr/lib/python/site-packages
Again
from scipy.xplt import *
failed. I am at a loss for words ....
Did you remove also /usr/include/python2.3/Numeric/ before Numeric re-install? Pearu
![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
Pearu Peterson wrote:
On Thu, 7 Oct 2004, Nils Wagner wrote:
I suspect you are using an old binary somehow...
-Travis
I have removed the build directories in scipy and Numeric. Also I have removed Numeric in /usr/lib/python/site-packages
Again
from scipy.xplt import *
failed. I am at a loss for words ....
Did you remove also
/usr/include/python2.3/Numeric/
before Numeric re-install?
No. BTW, is it possible to include something like an automized "make clean" in scipy ? Nils
Pearu
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/9b85a909fbfc71a3ea3275c7872e714d.jpg?s=120&d=mm&r=g)
On Thu, 7 Oct 2004, Nils Wagner wrote:
Did you remove also
/usr/include/python2.3/Numeric/
before Numeric re-install?
No.
That's probably the most important step when upgrading Numeric as distutils does not install new header files when old ones are in the way.
BTW, is it possible to include something like an automized "make clean" in scipy ?
Well, distutils provides one. Try python setup.py clean -a See also python setup.py clean --help This doesn't remove installed scipy from the system, of course. Pearu
![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
Pearu Peterson wrote:
On Thu, 7 Oct 2004, Nils Wagner wrote:
Did you remove also
/usr/include/python2.3/Numeric/
before Numeric re-install?
No.
That's probably the most important step when upgrading Numeric as distutils does not install new header files when old ones are in the way.
Now I have removed /usr/include/python2.3/Numeric the build directories in scipy and Numeric but again
from scipy.xplt import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 303, in __getattr__ module = self._ppimport_importer() File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 262, in _ppimport_importer raise PPImportError,\ scipy_base.ppimport.PPImportError: Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy_base/ppimport.py", line 273, in _ppimport_importer module = __import__(name,None,None,['*']) File "/usr/lib/python2.3/site-packages/scipy/xplt/__init__.py", line 12, in ? from Mplot import * File "/usr/lib/python2.3/site-packages/scipy/xplt/Mplot.py", line 1015, in ? import colorbar File "/usr/lib/python2.3/site-packages/scipy/xplt/colorbar.py", line 9, in ? from slice3 import * File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1581, in ? _poly_permutations4 = _construct3 (0) File "/usr/lib/python2.3/site-packages/scipy/xplt/slice3.py", line 1575, in _construct3 mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
How about f2py ? Is this package involved in this failure ? Nils
BTW, is it possible to include something like an automized "make clean" in scipy ?
Well, distutils provides one. Try
python setup.py clean -a
See also
python setup.py clean --help
This doesn't remove installed scipy from the system, of course.
Pearu
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
![](https://secure.gravatar.com/avatar/9b85a909fbfc71a3ea3275c7872e714d.jpg?s=120&d=mm&r=g)
On Thu, 7 Oct 2004, Nils Wagner wrote:
That's probably the most important step when upgrading Numeric as distutils does not install new header files when old ones are in the way.
Now I have removed /usr/include/python2.3/Numeric
the build directories in scipy and Numeric
Silly question but did you re-installed Numeric and scipy also?
but again
from scipy.xplt import * .. mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
May be it's time to you debug slice3.py file yourself..
How about f2py ? Is this package involved in this failure ?
No, I don't think so. Pearu
![](https://secure.gravatar.com/avatar/d41fa6e1fe29e6c5c5821b5a3f31f190.jpg?s=120&d=mm&r=g)
Pearu Peterson wrote:
On Thu, 7 Oct 2004, Nils Wagner wrote:
That's probably the most important step when upgrading Numeric as distutils does not install new header files when old ones are in the way.
Now I have removed /usr/include/python2.3/Numeric
the build directories in scipy and Numeric
Silly question but did you re-installed Numeric and scipy also?
Yes.
but again
from scipy.xplt import *
..
mask = find_mask (below, _node_edges3 [itype]) TypeError: Array can not be safely cast to required type
May be it's time to you debug slice3.py file yourself..
How about f2py ? Is this package involved in this failure ?
No, I don't think so.
Pearu
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
participants (4)
-
Nils Wagner
-
Pearu Peterson
-
Robert Kern
-
Travis Oliphant