[Numpy-discussion] Deprecate four `ndarray.ctypes` implementation artifacts

bas van beek bas.vanbeek at hotmail.com
Tue May 18 12:21:01 EDT 2021


Hi all,

The `ndarray.ctypes` object currently contains four (undocumented) methods that are essentially leftover implementation artifacts,
kept around for the sake of backwards compatibility. As this was three years ago it is, in my opinion, a suitable time now to properly deprecate them,
my question being if anyone would have objections to this.

The methods in question are:
* `get_data` (use the `data` property instead)
* `get_shape` (use the `shape` property instead)
* `get_strides` (use the `ctypes.strides` property instead)
* `get_as_parameter` (use the `_as_parameter_` property instead)

For those interested, a PR implementing their deprecation is currently up at https://github.com/numpy/numpy/pull/19031

Regards,
Bas van Beek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/numpy-discussion/attachments/20210518/9b407476/attachment.html>


More information about the NumPy-Discussion mailing list