[Numpy-discussion] How to handle a busted API?

Charles R Harris charlesr.harris@gmail....
Sun Jul 13 00:44:25 CDT 2008

Hi All,

This is apropos ticket #805 <http://scipy.org/scipy/numpy/ticket/805>. The
reporter wants to change the signature of the functions PyArray_FromDims and
PyArray_FromDimsAndDataAndDesc, which we really can't do at this point
because they are part of the Numpy API. The problem can be seen in the
current signatures:

PyArray_FromDims(int nd, int *d, int type)
PyArray_FromDimsAndDataAndDescr(int nd, int *d, PyArray_Descr *descr, char

where d points to the desired dimensions. On 64 bit architectures the int
type can be too small to hold the dimensions. Now these functions are old
and retained for compatibility; the user's problem turned up in num_utils,
which is a C++ interface to Numeric. Quite possibly other programs use it
also (BOOST?).

So the question is, how do we go about dealing with this. Do we remove them
at some point, breaking compatibility and the current API? If so, when do we
do this? Should we issue a deprecation warning? If so, how do we do it from
C? Should it show up at run time or compile time?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080712/da29a9ab/attachment-0001.html 

More information about the Numpy-discussion mailing list