diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2021-06-04 12:32:10 -0500 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2021-06-04 12:32:10 -0500 |
commit | 4353b9011d64a419c9dfa346824b82167f9ff16e (patch) | |
tree | 7bcd4bf27dc5074a2d03cc81ab36cf40a1cd1bf9 /doc | |
parent | 6790873334b143117f4e8d1f515def8c7fdeb9fb (diff) | |
download | numpy-4353b9011d64a419c9dfa346824b82167f9ff16e.tar.gz |
API: Delay string and number promotion deprecation/future warning
Unfortunately, this seems to cause some pain in pandas at least
to circumvent the warning.
Delaying may complicate the creation of ufuncs for strings, but
otherwise should not be a big problem. We have to make sure that
we can reimplement the change quickly though, it is an important
change in my opinion.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/release/1.21.0-notes.rst | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/doc/source/release/1.21.0-notes.rst b/doc/source/release/1.21.0-notes.rst index ac65b8fd0..c0d283b72 100644 --- a/doc/source/release/1.21.0-notes.rst +++ b/doc/source/release/1.21.0-notes.rst @@ -82,39 +82,6 @@ The methods in question are: Future Changes ============== -Promotion of strings with numbers and bools is deprecated ---------------------------------------------------------- -Any promotion of numbers and strings is deprecated and will -give a ``FutureWarning`` the main affected functionalities -are: - -* `numpy.promote_types` and `numpy.result_type` which will raise - an error in this case in the future. -* `numpy.concatenate` will raise an error when concatenating a string - and numeric array. You can use ``dtype="S"`` to explicitly request - a string result. -* `numpy.array` and related functions will start returning ``object`` - arrays because these functions use ``object`` as a fallback when - no common dtype can be found. However, it may happen that future - releases of NumPy will generally error in these cases. - -This will mainly affect code such as:: - - np.asarray(['string', 0]) - -and:: - - np.concatenate((['string'], [0])) - -in both cases adding ``dtype="U"`` or ``dtype="S"`` will give the -previous (string) result, while ``dtype=object`` will ensure an array with -object dtype is returned. - -Comparisons, universal functions, and casting are not affected by this. - -(`gh-18116 <https://github.com/numpy/numpy/pull/18116>`__) - - Expired deprecations ==================== |