summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorBrian Soto <Iamsoto@users.noreply.github.com>2020-08-04 20:27:00 -0700
committerGitHub <noreply@github.com>2020-08-04 23:27:00 -0400
commite2428594b77aef952610f930bacf4085ef1fcdf9 (patch)
tree47a4fd67c7506d8131cd5aec677e83477ce3be21 /numpy/core/numeric.py
parente3c52130add2ed5f7f0b9442b3b2742c09eb2de0 (diff)
downloadnumpy-e2428594b77aef952610f930bacf4085ef1fcdf9.tar.gz
DOC: Add note that allclose and isclose do not accept non-numeric types (#16835)
Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index e77161f59..84066dd30 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -2173,6 +2173,8 @@ def allclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
``allclose(a, b)`` to evaluate to True. The same is true for
`equal` but not `array_equal`.
+ `allclose` is not defined for non-numeric data types.
+
Examples
--------
>>> np.allclose([1e10,1e-7], [1.00001e10,1e-8])
@@ -2252,6 +2254,8 @@ def isclose(a, b, rtol=1.e-5, atol=1.e-8, equal_nan=False):
`atol` should be carefully selected for the use case at hand. A zero value
for `atol` will result in `False` if either `a` or `b` is zero.
+ `isclose` is not defined for non-numeric data types.
+
Examples
--------
>>> np.isclose([1e10,1e-7], [1.00001e10,1e-8])