umath.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. """
  2. Create the numpy.core.umath namespace for backward compatibility. In v1.16
  3. the multiarray and umath c-extension modules were merged into a single
  4. _multiarray_umath extension module. So we replicate the old namespace
  5. by importing from the extension module.
  6. """
  7. from . import _multiarray_umath
  8. from ._multiarray_umath import * # noqa: F403
  9. # These imports are needed for backward compatibility,
  10. # do not change them. issue gh-11862
  11. # _ones_like is semi-public, on purpose not added to __all__
  12. from ._multiarray_umath import _UFUNC_API, _add_newdoc_ufunc, _ones_like
  13. __all__ = [
  14. '_UFUNC_API', 'ERR_CALL', 'ERR_DEFAULT', 'ERR_IGNORE', 'ERR_LOG',
  15. 'ERR_PRINT', 'ERR_RAISE', 'ERR_WARN', 'FLOATING_POINT_SUPPORT',
  16. 'FPE_DIVIDEBYZERO', 'FPE_INVALID', 'FPE_OVERFLOW', 'FPE_UNDERFLOW', 'NAN',
  17. 'NINF', 'NZERO', 'PINF', 'PZERO', 'SHIFT_DIVIDEBYZERO', 'SHIFT_INVALID',
  18. 'SHIFT_OVERFLOW', 'SHIFT_UNDERFLOW', 'UFUNC_BUFSIZE_DEFAULT',
  19. 'UFUNC_PYVALS_NAME', '_add_newdoc_ufunc', 'absolute', 'add',
  20. 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh',
  21. 'bitwise_and', 'bitwise_or', 'bitwise_xor', 'cbrt', 'ceil', 'conj',
  22. 'conjugate', 'copysign', 'cos', 'cosh', 'deg2rad', 'degrees', 'divide',
  23. 'divmod', 'e', 'equal', 'euler_gamma', 'exp', 'exp2', 'expm1', 'fabs',
  24. 'floor', 'floor_divide', 'float_power', 'fmax', 'fmin', 'fmod', 'frexp',
  25. 'frompyfunc', 'gcd', 'geterrobj', 'greater', 'greater_equal', 'heaviside',
  26. 'hypot', 'invert', 'isfinite', 'isinf', 'isnan', 'isnat', 'lcm', 'ldexp',
  27. 'left_shift', 'less', 'less_equal', 'log', 'log10', 'log1p', 'log2',
  28. 'logaddexp', 'logaddexp2', 'logical_and', 'logical_not', 'logical_or',
  29. 'logical_xor', 'maximum', 'minimum', 'mod', 'modf', 'multiply', 'negative',
  30. 'nextafter', 'not_equal', 'pi', 'positive', 'power', 'rad2deg', 'radians',
  31. 'reciprocal', 'remainder', 'right_shift', 'rint', 'seterrobj', 'sign',
  32. 'signbit', 'sin', 'sinh', 'spacing', 'sqrt', 'square', 'subtract', 'tan',
  33. 'tanh', 'true_divide', 'trunc']