PATH:
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
numpy
/
core
/
tests
from numpy.testing import assert_ import numbers import numpy as np from numpy.core.numerictypes import sctypes class TestABC: def test_abstract(self): assert_(issubclass(np.number, numbers.Number)) assert_(issubclass(np.inexact, numbers.Complex)) assert_(issubclass(np.complexfloating, numbers.Complex)) assert_(issubclass(np.floating, numbers.Real)) assert_(issubclass(np.integer, numbers.Integral)) assert_(issubclass(np.signedinteger, numbers.Integral)) assert_(issubclass(np.unsignedinteger, numbers.Integral)) def test_floats(self): for t in sctypes['float']: assert_(isinstance(t(), numbers.Real), f"{t.__name__} is not instance of Real") assert_(issubclass(t, numbers.Real), f"{t.__name__} is not subclass of Real") assert_(not isinstance(t(), numbers.Rational), f"{t.__name__} is instance of Rational") assert_(not issubclass(t, numbers.Rational), f"{t.__name__} is subclass of Rational") def test_complex(self): for t in sctypes['complex']: assert_(isinstance(t(), numbers.Complex), f"{t.__name__} is not instance of Complex") assert_(issubclass(t, numbers.Complex), f"{t.__name__} is not subclass of Complex") assert_(not isinstance(t(), numbers.Real), f"{t.__name__} is instance of Real") assert_(not issubclass(t, numbers.Real), f"{t.__name__} is subclass of Real") def test_int(self): for t in sctypes['int']: assert_(isinstance(t(), numbers.Integral), f"{t.__name__} is not instance of Integral") assert_(issubclass(t, numbers.Integral), f"{t.__name__} is not subclass of Integral") def test_uint(self): for t in sctypes['uint']: assert_(isinstance(t(), numbers.Integral), f"{t.__name__} is not instance of Integral") assert_(issubclass(t, numbers.Integral), f"{t.__name__} is not subclass of Integral")
[-] test_custom_dtypes.py
[open]
[-] test_array_interface.py
[open]
[-] test_mem_policy.py
[open]
[-] test_dlpack.py
[open]
[-] test_argparse.py
[open]
[-] test_getlimits.py
[open]
[+]
..
[-] test_machar.py
[open]
[-] _locales.py
[open]
[-] test_arraymethod.py
[open]
[-] test_scalarinherit.py
[open]
[-] test_shape_base.py
[open]
[-] test_scalar_ctors.py
[open]
[-] test_half.py
[open]
[-] test_conversion_utils.py
[open]
[+]
__pycache__
[+]
examples
[-] test_numerictypes.py
[open]
[-] test_datetime.py
[open]
[-] test_einsum.py
[open]
[-] test_abc.py
[open]
[-] test_print.py
[open]
[-] test_nep50_promotions.py
[open]
[-] test_indexerrors.py
[open]
[-] test_errstate.py
[open]
[-] test_simd_module.py
[open]
[-] test_umath_complex.py
[open]
[-] test_mem_overlap.py
[open]
[-] test_overrides.py
[open]
[-] test_records.py
[open]
[-] test_umath_accuracy.py
[open]
[-] test_cpu_dispatcher.py
[open]
[-] test_scalarbuffer.py
[open]
[-] test_numeric.py
[open]
[-] test_dtype.py
[open]
[-] test_multiarray.py
[open]
[-] test_extint128.py
[open]
[-] test__exceptions.py
[open]
[-] test_deprecations.py
[open]
[-] test_hashtable.py
[open]
[-] test_ufunc.py
[open]
[-] test_protocols.py
[open]
[-] test_regression.py
[open]
[-] test_casting_floatingpoint_errors.py
[open]
[-] test_item_selection.py
[open]
[-] test_indexing.py
[open]
[-] test_nditer.py
[open]
[-] test_scalar_methods.py
[open]
[+]
data
[-] test_simd.py
[open]
[-] test_arrayprint.py
[open]
[-] test_strings.py
[open]
[-] test_unicode.py
[open]
[-] test_cpu_features.py
[open]
[-] test_casting_unittests.py
[open]
[-] test_cython.py
[open]
[-] test_memmap.py
[open]
[-] __init__.py
[open]
[-] test_defchararray.py
[open]
[-] test_longdouble.py
[open]
[-] test_array_coercion.py
[open]
[-] test_function_base.py
[open]
[-] test_scalarmath.py
[open]
[-] test_api.py
[open]
[-] test_limited_api.py
[open]
[-] test_scalarprint.py
[open]
[-] test_umath.py
[open]