__init__.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. from .type_check import *
  19. from .index_tricks import *
  20. from .function_base import *
  21. from .nanfunctions import *
  22. from .shape_base import *
  23. from .stride_tricks import *
  24. from .twodim_base import *
  25. from .ufunclike import *
  26. from .histograms import *
  27. from .polynomial import *
  28. from .utils import *
  29. from .arraysetops import *
  30. from .npyio import *
  31. from .arrayterator import Arrayterator
  32. from .arraypad import *
  33. from ._version import *
  34. from numpy.core._multiarray_umath import tracemalloc_domain
  35. __all__ = ['emath', 'math', 'tracemalloc_domain', 'Arrayterator']
  36. __all__ += type_check.__all__
  37. __all__ += index_tricks.__all__
  38. __all__ += function_base.__all__
  39. __all__ += shape_base.__all__
  40. __all__ += stride_tricks.__all__
  41. __all__ += twodim_base.__all__
  42. __all__ += ufunclike.__all__
  43. __all__ += arraypad.__all__
  44. __all__ += polynomial.__all__
  45. __all__ += utils.__all__
  46. __all__ += arraysetops.__all__
  47. __all__ += npyio.__all__
  48. __all__ += nanfunctions.__all__
  49. __all__ += histograms.__all__
  50. from numpy._pytesttester import PytestTester
  51. test = PytestTester(__name__)
  52. del PytestTester