[Numpy-discussion] Numeric on Dec Alpha

Michel Sanner sanner at scripps.edu
Fri Jun 23 14:22:24 CDT 2000


Hi, I posted this message on the python-list a while ago and did not hear
anything .. so I try here :)

I built Numeric on a Dec Alpha under OSF1 V4.0. I built fine but when I ran it
I witnessed strange behavior.

a = Numeric.identity(4)
a.shape = (16,)

would raise an exception about the size of the array needing to remain the same
???

Using the debugger I found in arrayobject.c:2201

        if (PyArray_As1D(&shape, (char **)&dimensions, &n, PyArray_LONG) == -1)
return NULL;

After this call shape [0] is 4 BUT shape[1] is 0 !

I changed the code to
                  if (PyArray_As1D(&shape, (char **)&dimensions, &n,
PyArray_INT) == -1) return NULL;

and got the right result.

Did anyone else run into this kind of preblems ? what is the correct way to fix
that ?

thanks

-Michel


-- 

-----------------------------------------------------------------------

>>>>>>>>>> AREA CODE CHANGE <<<<<<<<< we are now 858 !!!!!!!

Michel F. Sanner Ph.D.                   The Scripps Research Institute
Assistant Professor			Department of Molecular Biology
					  10550 North Torrey Pines Road
Tel. (858) 784-2341				     La Jolla, CA 92037
Fax. (858) 784-2860
sanner at scripps.edu                        http://www.scripps.edu/sanner
-----------------------------------------------------------------------





More information about the Numpy-discussion mailing list