[Biopython-dev] Versions of numpy/Numeric
Bruce Southey
bsouthey at gmail.com
Wed Sep 24 21:09:39 EDT 2008
On Wed, Sep 24, 2008 at 5:24 PM, Peter <biopython at maubp.freeserve.co.uk> wrote:
>> The not very informative list says it also ''includes a few some minor API
>> breakage first scheduled in the 1.1 release"
>> http://scipy.org/scipy/numpy/milestone/1.2.0
>>
>> But this is one of them! There is no message in the numpy 1.1 code. There is
>> an email on Jul 13, 2008
>> (http://www.nabble.com/Newly-deprecated-API-functions-td18436792.html) that
>> notes these are depreciated and will be scheduled removed for Numpy 1.3. So
>> rather annoying!
>
> Yes - this does seem annoying :(
>
>> Sorry, I did not realize until I looked that these were 1.2 related. So the
>> relevant output is:
>
> So in summary, the warnings from numpy 1.2 were multiple cases of the
> following where the old functions will be removed in numpy 1.3:
>
> PyArray_FromDims to PyArray_SimpleNew.
> PyArray_FromDimsAndDataAndDescr to PyArray_NewFromDescr
>
> Bio.Cluster will therefore need updating at some point - the next
> question is when were PyArray_SimpleNew and PyArray_NewFromDescr
> introduced...
>
I have never used the C-API so I looked at what I have available. The
earliest numpy code I have is 0.9.6 and these are defined in the
header file:
numpy/core/include/numpy/arrayobject.h
These are mentioned in the file numpy/doc/CAPI.txt ('Created:
October 2005') present at least in the versions from numpy-1.0.1 to
numpy-1.1.1 (I don't see it in the release candidate tarball) :
"``PyArray_SimpleNew`` is just a macro for ``PyArray_New`` with
default arguments.
Use ``PyArray_FILLWBYTE(arr, 0)`` to fill with zeros.
The ``PyArray_FromDims`` and family of functions are still available and
are loose wrappers around this function. These functions still take
``int *`` arguments. This should be fine on 32-bit systems, but on 64-bit
systems you may run into trouble if you frequently passed
``PyArray_FromDims`` the dimensions member of the old
``PyArrayObject`` structure
because ``sizeof(npy_intp) != sizeof(int)``.
"
Regards
Bruce
More information about the Biopython-dev
mailing list