summaryrefslogtreecommitdiff
path: root/doc/release/upcoming_changes/14933.compatibility.rst
blob: 1b5f1b113ddc1c5c3d6f639fb37134a6e6f84da2 (plain)
1
2
3
4
5
6
7
8
9
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 discouraged.
This also fixes ``np.choose`` to behave the same way as the rest of NumPy
in this respect.