summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/_add_newdocs.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index dc0285a11..ea7b96fd4 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -1808,7 +1808,8 @@ add_newdoc('numpy.core.multiarray', 'promote_types',
Returns the data type with the smallest size and smallest scalar
kind to which both ``type1`` and ``type2`` may be safely cast.
- The returned data type is always in native byte order.
+ The returned data type is always considered "canonical", this mainly
+ means that the promoted dtype will always be in native byte order.
This function is symmetric, but rarely associative.
@@ -1826,6 +1827,8 @@ add_newdoc('numpy.core.multiarray', 'promote_types',
Notes
-----
+ Please see `numpy.result_type` for additional information about promotion.
+
.. versionadded:: 1.6.0
Starting in NumPy 1.9, promote_types function now returns a valid string
@@ -1834,6 +1837,12 @@ add_newdoc('numpy.core.multiarray', 'promote_types',
dtype, even if it wasn't long enough to store the max integer/float value
converted to a string.
+ .. versionchanged:: 1.23.0
+
+ NumPy now supports promotion for more structured dtypes. It will now
+ remove unnecessary padding from a structure dtype and promote included
+ fields individually.
+
See Also
--------
result_type, dtype, can_cast