su, 2010-02-21 kello 02:13 -0700, Charles R Harris kirjoitti:
> The warning is
>
> dep.py:6: PendingDeprecationWarning: The CObject API is deprecated as
> of Python 3.1.  Please convert to using the Capsule API.
>   np.dtype('M8[3M/40]')
>
> This doesn't happen with the old dtypes, so I assume it is associated
> with something introduced for datetime. Any ideas? I've attached a
> script that shows the warning.

The PyCObjects are used at least within the __array_struct__ interface,
ufuncs, and apparently the datetime extra data is stored within one in
the array metadata dict.

The Capsule API seems pretty much the same as the CObject API. (Why the
name change?) We can probably #define PyCapsule_* compatibility defines
in npy_3kcompat.h that use PyCObject on 2.x, and use the real thing on
3.x.

-- 
Pauli Virtanen


_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to