__init__.py 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. """
  2. ========================================
  3. Interpolation (:mod:`scipy.interpolate`)
  4. ========================================
  5. .. currentmodule:: scipy.interpolate
  6. Sub-package for functions and objects used in interpolation.
  7. See the :ref:`user guide <tutorial-interpolate>` for recommendations on choosing a
  8. routine, and other usage details.
  9. Univariate interpolation
  10. ========================
  11. .. autosummary::
  12. :toctree: generated/
  13. make_interp_spline
  14. CubicSpline
  15. PchipInterpolator
  16. Akima1DInterpolator
  17. FloaterHormannInterpolator
  18. BarycentricInterpolator
  19. KroghInterpolator
  20. CubicHermiteSpline
  21. **Low-level data structures for univariate interpolation:**
  22. .. autosummary::
  23. :toctree: generated/
  24. PPoly
  25. BPoly
  26. BSpline
  27. Multivariate interpolation
  28. ==========================
  29. **Unstructured data**
  30. .. autosummary::
  31. :toctree: generated/
  32. LinearNDInterpolator
  33. NearestNDInterpolator
  34. CloughTocher2DInterpolator
  35. RBFInterpolator
  36. **For data on a grid:**
  37. .. autosummary::
  38. :toctree: generated/
  39. RegularGridInterpolator
  40. .. seealso::
  41. `scipy.ndimage.map_coordinates`,
  42. :ref:`An example wrapper for map_coordinates <tutorial-interpolate_cartesian-grids>`
  43. **Low-level data structures for tensor product polynomials and splines:**
  44. .. autosummary::
  45. :toctree: generated/
  46. NdPPoly
  47. NdBSpline
  48. 1-D spline smoothing and approximation
  49. ======================================
  50. .. autosummary::
  51. :toctree: generated/
  52. make_lsq_spline
  53. make_smoothing_spline
  54. make_splrep
  55. make_splprep
  56. generate_knots
  57. Rational Approximation
  58. ======================
  59. .. autosummary::
  60. :toctree: generated/
  61. AAA
  62. Interfaces to FITPACK routines for 1D and 2D spline fitting
  63. ===========================================================
  64. This section lists wrappers for `FITPACK <http://www.netlib.org/dierckx/>`__
  65. functionality for 1D and 2D smoothing splines. In most cases, users are better off
  66. using higher-level routines listed in previous sections.
  67. 1D FITPACK splines
  68. ------------------
  69. This package provides two sets of functionally equivalent wrappers: object-oriented and
  70. functional.
  71. **Functional FITPACK interface:**
  72. .. autosummary::
  73. :toctree: generated/
  74. splrep
  75. splprep
  76. splev
  77. splint
  78. sproot
  79. spalde
  80. splder
  81. splantider
  82. insert
  83. **Object-oriented FITPACK interface:**
  84. .. autosummary::
  85. :toctree: generated/
  86. UnivariateSpline
  87. InterpolatedUnivariateSpline
  88. LSQUnivariateSpline
  89. 2D FITPACK splines
  90. ------------------
  91. **For data on a grid:**
  92. .. autosummary::
  93. :toctree: generated/
  94. RectBivariateSpline
  95. RectSphereBivariateSpline
  96. **For unstructured data (OOP interface):**
  97. .. autosummary::
  98. :toctree: generated/
  99. BivariateSpline
  100. SmoothBivariateSpline
  101. SmoothSphereBivariateSpline
  102. LSQBivariateSpline
  103. LSQSphereBivariateSpline
  104. **For unstructured data (functional interface):**
  105. .. autosummary::
  106. :toctree: generated/
  107. bisplrep
  108. bisplev
  109. Additional tools
  110. ================
  111. .. autosummary::
  112. :toctree: generated/
  113. lagrange
  114. approximate_taylor_polynomial
  115. pade
  116. interpn
  117. griddata
  118. barycentric_interpolate
  119. krogh_interpolate
  120. pchip_interpolate
  121. Rbf
  122. interp1d
  123. interp2d
  124. .. seealso::
  125. `scipy.ndimage.map_coordinates`,
  126. `scipy.ndimage.spline_filter`,
  127. """ # noqa: E501
  128. from ._interpolate import *
  129. from ._fitpack_py import *
  130. from ._fitpack2 import *
  131. from ._rbf import Rbf
  132. from ._rbfinterp import *
  133. from ._polyint import *
  134. from ._cubic import *
  135. from ._ndgriddata import *
  136. from ._bsplines import *
  137. from ._fitpack_repro import generate_knots, make_splrep, make_splprep
  138. from ._pade import *
  139. from ._rgi import *
  140. from ._ndbspline import NdBSpline
  141. from ._bary_rational import *
  142. # Deprecated namespaces, to be removed in v2.0.0
  143. from . import fitpack, fitpack2, interpolate, ndgriddata, polyint, rbf, interpnd
  144. __all__ = [s for s in dir() if not s.startswith('_')]
  145. from scipy._lib._testutils import PytestTester
  146. test = PytestTester(__name__)
  147. del PytestTester
  148. # Backward compatibility
  149. pchip = PchipInterpolator