[SciPy-user] strange ValueError in scipy_core

Chris Fonnesbeck fonnesbeck at gmail.com
Thu Nov 10 18:33:27 CST 2005


On 11/10/05, Travis Oliphant <oliphant at ee.byu.edu> wrote:
> Chris Fonnesbeck wrote:
>
> >I am converting some code over to scipy_core which involves populating
> >a relatively sparse matrix, so I am generating an array of zeros, and
> >substituting the non-zero elements. However, this substitution does
> >not seem to be allowed. Here is the relevant section of code.
> >
> >
> I think I've recreated what you are doing.  Matrix is a Numeric array
> and apparently the other items are scipy core arrays.  The
> multiplication result actually produces an array scalar.  The problem
> was with the __array_struct__ interface for the array scalar.
>
> Array scalars are only readable so the WRITEABLE flag was getting reset
> thus raising the error in Numeric.  (But, setting the flag was
> unnecessary because the data from the scalar was copied anyway).
>
> Thanks for bringing this one to light.   It's fixed in SVN scipy core.
>

Thanks. Will go break something else now.

C.

--
Chris Fonnesbeck
Atlanta, GA



More information about the SciPy-user mailing list