diff options
author | Sebastian Berg <sebastianb@nvidia.com> | 2022-11-07 12:14:34 +0100 |
---|---|---|
committer | Sebastian Berg <sebastianb@nvidia.com> | 2022-11-07 12:14:34 +0100 |
commit | 49b18ff32ed25f16b7af8282237b5668ddfb5087 (patch) | |
tree | bc568a9f5fa0ec563eca58f1795afc0b173fc7b7 /numpy/ma/tests | |
parent | b70a1e995faaf01cbf89cfe1316a7c14570cdbec (diff) | |
download | numpy-49b18ff32ed25f16b7af8282237b5668ddfb5087.tar.gz |
DEP: Deprecate `np.find_common_type`
The function uses the numeric scalar common dtype/promotion rules.
These are subtly different from the typical NumPy rules defined by
`np.result_type`.
Mainly, there is no good reason to have two subtly different rules
exposed and `find_common_type` is less reliable, slower, and not really
maintainable when it comes to NEP 50.
Diffstat (limited to 'numpy/ma/tests')
-rw-r--r-- | numpy/ma/tests/test_core.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index f32038a01..6196dcfab 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -4461,7 +4461,7 @@ class TestMaskedArrayFunctions: x = np.arange(4, dtype=np.int32) y = np.arange(4, dtype=np.float32) * 2.2 test = where(x > 1.5, y, x).dtype - control = np.find_common_type([np.int32, np.float32], []) + control = np.result_type(np.int32, np.float32) assert_equal(test, control) def test_where_broadcast(self): |