Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/numpy/_core/umath.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

6 statements  

1""" 

2Create the numpy._core.umath namespace for backward compatibility. In v1.16 

3the multiarray and umath c-extension modules were merged into a single 

4_multiarray_umath extension module. So we replicate the old namespace 

5by importing from the extension module. 

6 

7""" 

8 

9import numpy 

10 

11from . import _multiarray_umath 

12from ._multiarray_umath import * 

13 

14# These imports are needed for backward compatibility, 

15# do not change them. issue gh-11862 

16# _ones_like is semi-public, on purpose not added to __all__ 

17# These imports are needed for the strip & replace implementations 

18from ._multiarray_umath import ( 

19 _UFUNC_API, 

20 _add_newdoc_ufunc, 

21 _center, 

22 _expandtabs, 

23 _expandtabs_length, 

24 _extobj_contextvar, 

25 _get_extobj_dict, 

26 _ljust, 

27 _lstrip_chars, 

28 _lstrip_whitespace, 

29 _make_extobj, 

30 _ones_like, 

31 _partition, 

32 _partition_index, 

33 _replace, 

34 _rjust, 

35 _rpartition, 

36 _rpartition_index, 

37 _rstrip_chars, 

38 _rstrip_whitespace, 

39 _slice, 

40 _strip_chars, 

41 _strip_whitespace, 

42 _zfill, 

43) 

44 

45__all__ = [ 

46 'absolute', 'add', 

47 'arccos', 'arccosh', 'arcsin', 'arcsinh', 'arctan', 'arctan2', 'arctanh', 

48 'bitwise_and', 'bitwise_or', 'bitwise_xor', 'cbrt', 'ceil', 'conj', 

49 'conjugate', 'copysign', 'cos', 'cosh', 'bitwise_count', 'deg2rad', 

50 'degrees', 'divide', 'divmod', 'e', 'equal', 'euler_gamma', 'exp', 'exp2', 

51 'expm1', 'fabs', 'floor', 'floor_divide', 'float_power', 'fmax', 'fmin', 

52 'fmod', 'frexp', 'frompyfunc', 'gcd', 'greater', 'greater_equal', 

53 'heaviside', 'hypot', 'invert', 'isfinite', 'isinf', 'isnan', 'isnat', 

54 'lcm', 'ldexp', 'left_shift', 'less', 'less_equal', 'log', 'log10', 

55 'log1p', 'log2', 'logaddexp', 'logaddexp2', 'logical_and', 'logical_not', 

56 'logical_or', 'logical_xor', 'matmul', 'matvec', 'maximum', 'minimum', 'mod', 

57 'modf', 'multiply', 'negative', 'nextafter', 'not_equal', 'pi', 'positive', 

58 'power', 'rad2deg', 'radians', 'reciprocal', 'remainder', 'right_shift', 

59 'rint', 'sign', 'signbit', 'sin', 'sinh', 'spacing', 'sqrt', 'square', 

60 'subtract', 'tan', 'tanh', 'true_divide', 'trunc', 'vecdot', 'vecmat']