__init__.py 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. """
  2. **Note:** almost all functions in the ``numpy.lib`` namespace
  3. are also present in the main ``numpy`` namespace. Please use the
  4. functions as ``np.<funcname>`` where possible.
  5. ``numpy.lib`` is mostly a space for implementing functions that don't
  6. belong in core or in another NumPy submodule with a clear purpose
  7. (e.g. ``random``, ``fft``, ``linalg``, ``ma``).
  8. Most contains basic functions that are used by several submodules and are
  9. useful to have in the main name-space.
  10. """
  11. import math
  12. from numpy.version import version as __version__
  13. # Public submodules
  14. # Note: recfunctions and (maybe) format are public too, but not imported
  15. from . import mixins
  16. from . import scimath as emath
  17. # Private submodules
  18. # load module names. See https://github.com/networkx/networkx/issues/5838
  19. from . import type_check
  20. from . import index_tricks
  21. from . import function_base
  22. from . import nanfunctions
  23. from . import shape_base
  24. from . import stride_tricks
  25. from . import twodim_base
  26. from . import ufunclike
  27. from . import histograms
  28. from . import polynomial
  29. from . import utils
  30. from . import arraysetops
  31. from . import npyio
  32. from . import arrayterator
  33. from . import arraypad
  34. from . import _version
  35. from .type_check import *
  36. from .index_tricks import *
  37. from .function_base import *
  38. from .nanfunctions import *
  39. from .shape_base import *
  40. from .stride_tricks import *
  41. from .twodim_base import *
  42. from .ufunclike import *
  43. from .histograms import *
  44. from .polynomial import *
  45. from .utils import *
  46. from .arraysetops import *
  47. from .npyio import *
  48. from .arrayterator import Arrayterator
  49. from .arraypad import *
  50. from ._version import *
  51. from numpy.core._multiarray_umath import tracemalloc_domain
  52. __all__ = ['emath', 'math', 'tracemalloc_domain', 'Arrayterator']
  53. __all__ += type_check.__all__
  54. __all__ += index_tricks.__all__
  55. __all__ += function_base.__all__
  56. __all__ += shape_base.__all__
  57. __all__ += stride_tricks.__all__
  58. __all__ += twodim_base.__all__
  59. __all__ += ufunclike.__all__
  60. __all__ += arraypad.__all__
  61. __all__ += polynomial.__all__
  62. __all__ += utils.__all__
  63. __all__ += arraysetops.__all__
  64. __all__ += npyio.__all__
  65. __all__ += nanfunctions.__all__
  66. __all__ += histograms.__all__
  67. from numpy._pytesttester import PytestTester
  68. test = PytestTester(__name__)
  69. del PytestTester