diff options
Diffstat (limited to 'numpy/lib')
| -rw-r--r-- | numpy/lib/type_check.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py index 383fbda3c..56afd83ce 100644 --- a/numpy/lib/type_check.py +++ b/numpy/lib/type_check.py @@ -364,6 +364,19 @@ def isrealobj(x): -------- iscomplexobj, isreal + Notes + ----- + The function is only meant for arrays with numerical values but it + accepts all other objects. Since it assumes array input, the return + value of other objects may be True. + + >>> np.isrealobj('A string') + True + >>> np.isrealobj(False) + True + >>> np.isrealobj(None) + True + Examples -------- >>> np.isrealobj(1) |
