diff options
author | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2021-01-03 11:11:15 -0500 |
---|---|---|
committer | Marten van Kerkwijk <mhvk@astro.utoronto.ca> | 2021-02-22 10:37:32 -0500 |
commit | aeae93b6c0042f6ed8f45205545985cc194f84f3 (patch) | |
tree | 404f3e80245dabae30b884cbf64b4821b8bc0451 /doc/release | |
parent | 68e4d56eb9b539cccd582de7e7fb09c373d37609 (diff) | |
download | numpy-aeae93b6c0042f6ed8f45205545985cc194f84f3.tar.gz |
API: make piecewise subclass safe using use zeros_like.
Subclass input of piecewise was already respected, so it seems more
logical to ensure the output is the same subclass (possibly just an
oversight that it was not done before).
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/upcoming_changes/18110.change.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/18110.change.rst b/doc/release/upcoming_changes/18110.change.rst new file mode 100644 index 000000000..7dbf8e5b7 --- /dev/null +++ b/doc/release/upcoming_changes/18110.change.rst @@ -0,0 +1,5 @@ +`numpy.piecewise` output class now matches the input class +---------------------------------------------------------- +When `numpy.ndarray` subclasses are used on input to `numpy.piecewise`, +they are passed on to the functions. The output will now be of the +same subclass as well. |