diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-12-18 21:04:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-18 21:04:03 +0200 |
commit | 0cea652454fdd04fb90266865792281ef5404b8c (patch) | |
tree | 8f98208d1c2d477f61636185c00f95a3d8b7c4dc /doc/release | |
parent | 01289c221ef45ed398f5c3822501692e849f1859 (diff) | |
parent | c5da77d47309b6bf11f13f3b2e760f9b21423427 (diff) | |
download | numpy-0cea652454fdd04fb90266865792281ef5404b8c.tar.gz |
Merge pull request #14933 from seberg/cleanup-converttocommontype
API: Use `ResultType` in `PyArray_ConvertToCommonType`
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/upcoming_changes/14933.compatibility.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/14933.compatibility.rst b/doc/release/upcoming_changes/14933.compatibility.rst new file mode 100644 index 000000000..b939fec7f --- /dev/null +++ b/doc/release/upcoming_changes/14933.compatibility.rst @@ -0,0 +1,10 @@ +Scalar promotion in ``PyArray_ConvertToCommonType`` +--------------------------------------------------- + +The promotion of mixed scalars and arrays in ``PyArray_ConvertToCommonType`` +has been changed to adhere to those used by ``np.result_type``. +This means that input such as ``(1000, np.array([1], dtype=np.uint8)))`` +will now return ``uint16`` dtypes. In most cases the behaviour is unchanged. +Note that the use of this C-API function is generally discouarged. +This also fixes ``np.choose`` to behave the same way as the rest of NumPy +in this respect. |