__init__.py 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # -*- coding: utf-8 -*-
  2. u"""
  3. ==================================
  4. Input and output (:mod:`scipy.io`)
  5. ==================================
  6. .. currentmodule:: scipy.io
  7. SciPy has many modules, classes, and functions available to read data
  8. from and write data to a variety of file formats.
  9. .. seealso:: `NumPy IO routines <https://www.numpy.org/devdocs/reference/routines.io.html>`__
  10. MATLAB® files
  11. =============
  12. .. autosummary::
  13. :toctree: generated/
  14. loadmat - Read a MATLAB style mat file (version 4 through 7.1)
  15. savemat - Write a MATLAB style mat file (version 4 through 7.1)
  16. whosmat - List contents of a MATLAB style mat file (version 4 through 7.1)
  17. For low-level MATLAB reading and writing utilities, see `scipy.io.matlab`.
  18. IDL® files
  19. ==========
  20. .. autosummary::
  21. :toctree: generated/
  22. readsav - Read an IDL 'save' file
  23. Matrix Market files
  24. ===================
  25. .. autosummary::
  26. :toctree: generated/
  27. mminfo - Query matrix info from Matrix Market formatted file
  28. mmread - Read matrix from Matrix Market formatted file
  29. mmwrite - Write matrix to Matrix Market formatted file
  30. Unformatted Fortran files
  31. ===============================
  32. .. autosummary::
  33. :toctree: generated/
  34. FortranFile - A file object for unformatted sequential Fortran files
  35. FortranEOFError - Exception indicating the end of a well-formed file
  36. FortranFormattingError - Exception indicating an inappropriate end
  37. Netcdf
  38. ======
  39. .. autosummary::
  40. :toctree: generated/
  41. netcdf_file - A file object for NetCDF data
  42. netcdf_variable - A data object for the netcdf module
  43. Harwell-Boeing files
  44. ====================
  45. .. autosummary::
  46. :toctree: generated/
  47. hb_read -- read H-B file
  48. hb_write -- write H-B file
  49. Wav sound files (:mod:`scipy.io.wavfile`)
  50. =========================================
  51. .. module:: scipy.io.wavfile
  52. .. autosummary::
  53. :toctree: generated/
  54. read
  55. write
  56. WavFileWarning
  57. Arff files (:mod:`scipy.io.arff`)
  58. =================================
  59. .. module:: scipy.io.arff
  60. .. autosummary::
  61. :toctree: generated/
  62. loadarff
  63. MetaData
  64. ArffError
  65. ParseArffError
  66. """
  67. # matfile read and write
  68. from .matlab import loadmat, savemat, whosmat
  69. # netCDF file support
  70. from ._netcdf import netcdf_file, netcdf_variable
  71. # Fortran file support
  72. from ._fortran import FortranFile, FortranEOFError, FortranFormattingError
  73. from ._mmio import mminfo, mmread, mmwrite
  74. from ._idl import readsav
  75. from ._harwell_boeing import hb_read, hb_write
  76. # Deprecated namespaces, to be removed in v2.0.0
  77. from . import arff, harwell_boeing, idl, mmio, netcdf, wavfile
  78. __all__ = [s for s in dir() if not s.startswith('_')]
  79. from scipy._lib._testutils import PytestTester
  80. test = PytestTester(__name__)
  81. del PytestTester