-
Notifications
You must be signed in to change notification settings - Fork 23
Deprecate .T property on non-2D dpnp.ndarray
#2681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Array API standard conformance tests for dpnp=0.20.0dev1=py313h509198e_8 ran successfully. |
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/2681/index.html |
antonwolfy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @vlad-perevezentsev
LGTM with a small nit
|
|
||
| * `dpnp.asfarray` is deprecated. Use `dpnp.asarray` with an appropriate dtype instead [#2650](https://github.com/IntelPython/dpnp/pull/2650) | ||
| * Passing the output array ``out`` positionally to `dpnp.minimum` and `dpnp.maximum` is deprecated. Pass the output with the keyword form, e.g. ``dpnp.minimum(a, b, out=c)`` [#2659](https://github.com/IntelPython/dpnp/pull/2659) | ||
| * Using the `.T` property on non-2D `dpnp.ndarray` is deprecated. Use `self.transpose()` or `self.mT` instead [#2681](https://github.com/IntelPython/dpnp/pull/2681) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add more details:
| * Using the `.T` property on non-2D `dpnp.ndarray` is deprecated. Use `self.transpose()` or `self.mT` instead [#2681](https://github.com/IntelPython/dpnp/pull/2681) | |
| * `dpnp.ndarray.T` property is deprecated for not two-dimensional array to be compatible with the Python array API standard. To achieve a similar behavior when ``a.ndim != 2``, either ``a.transpose()``, or ``a.mT`` (swaps the last two axes only), or ``dpnp.permute_dims(a, range(a.ndim)[::-1])`` can be used. [#2681](https://github.com/IntelPython/dpnp/pull/2681) |
This PR suggests raising
DeprecationWarningfor.Tproperty ondpnp.ndarrayother than 2D and in a future release will raise an error according to the Python Array API