pyinterp.core.bicubic_float32

pyinterp.core.bicubic_float32(*args, **kwargs)

Overloaded function.

  1. bicubic_float32(grid: pyinterp.core.Grid2DFloat32, x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], nx: int = 3, ny: int = 3, fitting_model: str = ‘bicubic’, boundary: str = ‘undef’, bounds_error: bool = False, num_threads: int = 0) -> numpy.ndarray[numpy.float64]

Bicubic gridded 2D interpolation.

Parameters
  • grid (pyinterp.core.Grid2DFloat32) – Grid containing the values to be interpolated.

  • x (numpy.ndarray) – X-values.

  • y (numpy.ndarray) – Y-values.

  • nx (int, optional) – The number of X coordinate values required to perform the interpolation. Defaults to 3.

  • ny (int, optional) – The number of Y coordinate values required to perform the interpolation. Defaults to 3.

  • fitting_model (str, optional) – Type of interpolation to be performed. Defaults to bicubic

  • boundary (str, optional) – Type of axis boundary management. Defaults to undef.

  • bounds_error (bool, optional) – If True, when interpolated values are requested outside of the domain of the input axes (x,y), a ValueError is raised. If False, then value is set to NaN.

  • num_threads (int, optional) – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.

Returns

Values interpolated

Return type

numpy.ndarray

  1. bicubic_float32(grid: pyinterp.core.Grid3DFloat32, x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], z: numpy.ndarray[numpy.float64], nx: int = 3, ny: int = 3, fitting_model: str = ‘bicubic’, boundary: str = ‘undef’, bounds_error: bool = False, num_threads: int = 0) -> numpy.ndarray[numpy.float64]

Bicubic gridded 3D interpolation.

A bicubic 2D interpolation is performed along the X and Y axes of the 3D grid, and linearly along the Z axis between the two values obtained by the spatial bicubic 2D interpolation.

Parameters
  • grid (pyinterp.core.Grid3DFloat32) – Grid containing the values to be interpolated.

  • x (numpy.ndarray) – X-values.

  • y (numpy.ndarray) – Y-values.

  • z (numpy.ndarray) – Z-values.

  • nx (int, optional) – The number of X coordinate values required to perform the interpolation. Defaults to 3.

  • ny (int, optional) – The number of Y coordinate values required to perform the interpolation. Defaults to 3.

  • fitting_model (str, optional) – Type of interpolation to be performed. Defaults to bicubic

  • boundary (str, optional) – Type of axis boundary management. Defaults to undef.

  • bounds_error (bool, optional) – If True, when interpolated values are requested outside of the domain of the input axes (x,y), a ValueError is raised. If False, then value is set to NaN.

  • num_threads (int, optional) – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.

Returns

Values interpolated.

Return type

numpy.ndarray

  1. bicubic_float32(grid: pyinterp.core.TemporalGrid3DFloat32, x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], z: numpy.ndarray[numpy.int64], nx: int = 3, ny: int = 3, fitting_model: str = ‘bicubic’, boundary: str = ‘undef’, bounds_error: bool = False, num_threads: int = 0) -> numpy.ndarray[numpy.float64]

Bicubic gridded 3D interpolation.

A bicubic 2D interpolation is performed along the X and Y axes of the 3D grid, and linearly along the Z axis between the two values obtained by the spatial bicubic 2D interpolation.

Parameters
  • grid (pyinterp.core.TemporalGrid3DFloat32) – Grid containing the values to be interpolated.

  • x (numpy.ndarray) – X-values.

  • y (numpy.ndarray) – Y-values.

  • z (numpy.ndarray) – Z-values.

  • nx (int, optional) – The number of X coordinate values required to perform the interpolation. Defaults to 3.

  • ny (int, optional) – The number of Y coordinate values required to perform the interpolation. Defaults to 3.

  • fitting_model (str, optional) – Type of interpolation to be performed. Defaults to bicubic

  • boundary (str, optional) – Type of axis boundary management. Defaults to undef.

  • bounds_error (bool, optional) – If True, when interpolated values are requested outside of the domain of the input axes (x,y), a ValueError is raised. If False, then value is set to NaN.

  • num_threads (int, optional) – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.

Returns

Values interpolated.

Return type

numpy.ndarray

  1. bicubic_float32(grid: pyinterp.core.Grid4DFloat32, x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], z: numpy.ndarray[numpy.float64], u: numpy.ndarray[numpy.float64], nx: int = 3, ny: int = 3, fitting_model: str = ‘bicubic’, boundary: str = ‘undef’, bounds_error: bool = False, num_threads: int = 0) -> numpy.ndarray[numpy.float64]

Bicubic gridded 4D interpolation

A bicubic 2D interpolation is performed along the X and Y axes of the 4D grid, and linearly along the Z and U axes between the four values obtained by the spatial bicubic 2D interpolation.

Parameters
  • (pyinterp.core.Grid4DFloat32) – Grid containing the values to be interpolated.

  • x (numpy.ndarray) – X-values.

  • y (numpy.ndarray) – Y-values.

  • z (numpy.ndarray) – Z-values.

  • u (numpy.ndarray) – U-values.

  • nx (int, optional) – The number of X coordinate values required to perform the interpolation. Defaults to 3.

  • ny (int, optional) – The number of Y coordinate values required to perform the interpolation. Defaults to 3.

  • fitting_model (str, optional) – Type of interpolation to be performed. Defaults to bicubic

  • boundary (str, optional) – Type of axis boundary management. Defaults to undef.

  • bounds_error (bool, optional) – If True, when interpolated values are requested outside of the domain of the input axes (x,y), a ValueError is raised. If False, then value is set to NaN.

  • num_threads (int, optional) – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.

Returns

Values interpolated.

Return type

numpy.ndarray

  1. bicubic_float32(grid: pyinterp.core.TemporalGrid4DFloat32, x: numpy.ndarray[numpy.float64], y: numpy.ndarray[numpy.float64], z: numpy.ndarray[numpy.int64], u: numpy.ndarray[numpy.float64], nx: int = 3, ny: int = 3, fitting_model: str = ‘bicubic’, boundary: str = ‘undef’, bounds_error: bool = False, num_threads: int = 0) -> numpy.ndarray[numpy.float64]

Bicubic gridded 4D interpolation

A bicubic 2D interpolation is performed along the X and Y axes of the 4D grid, and linearly along the Z and U axes between the four values obtained by the spatial bicubic 2D interpolation.

Parameters
  • (pyinterp.core.TemporalGrid4DFloat32) – Grid containing the values to be interpolated.

  • x (numpy.ndarray) – X-values.

  • y (numpy.ndarray) – Y-values.

  • z (numpy.ndarray) – Z-values.

  • u (numpy.ndarray) – U-values.

  • nx (int, optional) – The number of X coordinate values required to perform the interpolation. Defaults to 3.

  • ny (int, optional) – The number of Y coordinate values required to perform the interpolation. Defaults to 3.

  • fitting_model (str, optional) – Type of interpolation to be performed. Defaults to bicubic

  • boundary (str, optional) – Type of axis boundary management. Defaults to undef.

  • bounds_error (bool, optional) – If True, when interpolated values are requested outside of the domain of the input axes (x,y), a ValueError is raised. If False, then value is set to NaN.

  • num_threads (int, optional) – The number of threads to use for the computation. If 0 all CPUs are used. If 1 is given, no parallel computing code is used at all, which is useful for debugging. Defaults to 0.

Returns

Values interpolated.

Return type

numpy.ndarray