[Numpy-discussion] Some questions about PyArray_As2D.

Konrad Hinsen hinsen at cnrs-orleans.fr
Wed Dec 11 05:37:02 EST 2002


Andrea Riciputi <ariciputi at pito.com> writes:

> As far as I can understand the source version is correct while the
> manual's one is not. Am I wrong?

The source code always wins the argument :-)

> 2) Next in the source code I've found the following memory allocation:
> 
> data = (char **)malloc(n*sizeof(char *));
> 
> without checking if malloc return NULL or not. As far as I know it's
> not safe, even if it's very unlikely that this malloc would fail.

Right. Did you submit a bug report?

Konrad.
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-2.38.25.56.24
Rue Charles Sadron                       | Fax:  +33-2.38.63.15.17
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais
-------------------------------------------------------------------------------




More information about the NumPy-Discussion mailing list