[MATRIX-SIG] Re: problem with Statistics module

Konrad Hinsen hinsen@ibs.ibs.fr
Thu, 18 Sep 1997 10:41:48 +0200


> I have uncovered a small problem with using your
> Statistics module: when using it on arrays of
> type Object ('O'), standardDeviation will segfault.

For me too, but I can't do anything about that in Statistics.

> as type Object.  When I extract a row from the matrix into a new
> array, called c, it is created as type O, even though it only contains
> floats.  Calling standardDeviation on an array of type Object causes the
> segfault.  

It is intended that a subarray always has the same type as the
original array. But of course object arrays shouldn't cause
a segment fault.

> I expect the best thing I can do here is cast the array
> explicitly as type 'd' when I extract a row.  But I'd prefer that

That's probably the best workaround.

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________