Core API Documentation#

Low-level classes & functions implemented in the compiled extension module (pyinterp.core). Most users should start with the high-level API Documentation overview.

NumPy Datetime Utilities#

Vectorized helpers for working with numpy.datetime64 values.

core.dateutils.date(array)

Extract the date part from a datetime64 array.

core.dateutils.datetime(array)

Convert datetime64 values to native Python datetime objects.

core.dateutils.timedelta_since_january(array)

Calculate the timedelta since January 1st.

core.dateutils.isocalendar(array)

Extract the ISO calendar from datetime64 values.

core.dateutils.time(array)

Extract the time part from a datetime64 array.

core.dateutils.weekday(array)

Get the weekday for each date in the datetime64 array.

Bicubic & Spline Routines#

Internal bicubic spline interpolation kernels.

core.bicubic_float32(*args, **kwargs)

Overloaded function.

core.bicubic_float64(*args, **kwargs)

Overloaded function.

core.spline_float32(*args, **kwargs)

Overloaded function.

core.spline_float64(*args, **kwargs)

Overloaded function.

Binning#

Core accumulation structures by dtype.

core.Binning1DFloat64(self, x)

Create a 1D binning for grouping values into bins on a vector.

core.Binning1DFloat32(self, x)

Create a 1D binning for grouping values into bins on a vector.

core.Binning2DFloat64(self, x, y[, wgs])

Create a 2D binning for grouping values into bins on a grid.

core.Binning2DFloat32(self, x, y[, wgs])

Create a 2D binning for grouping values into bins on a grid.

core.Histogram2DFloat64

Histogram2DFloat64(self, x: pyinterp.core.Axis, y: pyinterp.core.Axis, bins: int | None = None)Group continuous values into bins located on a grid.

core.Histogram2DFloat32

Histogram2DFloat32(self, x: pyinterp.core.Axis, y: pyinterp.core.Axis, bins: int | None = None)Group continuous values into bins located on a grid.

Bivariate Interpolators#

Object oriented 2D interpolator classes.

core.Bilinear2D

Bilinear interpolation in a 2D space.

core.BivariateInterpolator2D

Bilinear interpolation in a 2D space.

core.InverseDistanceWeighting2D

Inverse distance weighting interpolation in a 2D space.

core.Nearest2D

Nearest interpolation in a 2D space.

Bivariate Kernel Functions#

Vectorized functional 2D interpolation routines.

core.bivariate_int8(grid, x, y, interpolator)

Interpolate values on a bivariate function.

core.bivariate_float32(grid, x, y, interpolator)

Interpolate values on a bivariate function.

core.bivariate_float64(grid, x, y, interpolator)

Interpolate values on a bivariate function.

Cartesian Grids#

Typed grid containers.

core.Grid2DInt8(self, x, y, array)

Cartesian Grid 2D.

core.Grid2DFloat32(self, x, y, array)

Cartesian Grid 2D.

core.Grid2DFloat64(self, x, y, array)

Cartesian Grid 2D.

core.Grid3DInt8(self, x, y, z, array)

Cartesian Grid 3D

core.Grid3DFloat32(self, x, y, z, array)

Cartesian Grid 3D

core.Grid3DFloat64(self, x, y, z, array)

Cartesian Grid 3D

core.Grid4DInt8(self, x, y, z, u, array)

Cartesian Grid 4D

core.Grid4DFloat32(self, x, y, z, u, array)

Cartesian Grid 4D

core.Grid4DFloat64(self, x, y, z, u, array)

Cartesian Grid 4D

Univariate Descriptive Statistics#

Streaming statistics.

core.DescriptiveStatisticsFloat32(self, ...)

Compute univariate descriptive statistics.

core.DescriptiveStatisticsFloat64(self, ...)

Compute univariate descriptive statistics.

core.StreamingHistogramFloat64(self, values)

Compute streaming histogram for statistical analysis.

core.StreamingHistogramFloat32(self, values)

Compute streaming histogram for statistical analysis.

Geodetic System#

Geodetic primitives and spatial operations.

core.geodetic.Box(self, min_corner, max_corner)

Define a box made of two corner points.

core.geodetic.Coordinates(self[, spheroid])

Create a World Geodetic Coordinates System.

core.geodetic.Crossover(self, half_orbit_1, ...)

Calculate the crossover between two half-orbits.

core.geodetic.LineString(self, lon, lat)

Create a linestring as a collection of points.

core.geodetic.MultiPolygon(self, polygons)

Create a MultiPolygon collection of polygons.

core.geodetic.Point(self[, lon, lat])

Create a point in a geographic coordinate system.

core.geodetic.Polygon(self, outer[, inners])

Create a polygon with an outer ring and optional inner rings.

core.geodetic.RTree(self[, spheroid])

Create an R*Tree spatial index.

core.geodetic.Spheroid(self, ...)

Create a World Geodetic System (WGS).

Geohash (Integer)#

Integer encoded geohash helpers.

core.geohash.int64.decode(hash[, precision, ...])

Decode geohash into geographic coordinates.

core.geohash.int64.encode(lon, lat[, precision])

Encode geographic coordinates into geohash codes.

core.geohash.int64.neighbors(hash[, precision])

Get all neighbors of a geohash code.

Geohash (Bytes)#

Byte encoded geohash helpers and transformations.

core.GeoHash(self, latitude, longitude[, ...])

Create a GeoHash encoded in base 32.

core.geohash.area(hash[, wgs])

Calculate the area covered by geohash codes.

core.geohash.bounding_boxes(*args, **kwargs)

Overloaded function.

core.geohash.decode(hash[, round])

Decode geohash strings into geographic coordinates.

core.geohash.encode(lon, lat[, precision])

Encode geographic coordinates into geohash strings.

core.geohash.int64

GeoHash encoded as integer 64 bits

core.geohash.transform(hash[, precision])

Transform geohash codes between different precision levels.

core.geohash.where(hash)

Get the start and end indexes for successive geohash codes.

Temporal Cartesian Grids#

Grids extended with a time dimension.

core.TemporalGrid3DFloat32(self, x, y, z, array)

Temporal Cartesian Grid 3D

core.TemporalGrid3DFloat64(self, x, y, z, array)

Temporal Cartesian Grid 3D

core.TemporalGrid4DFloat32(self, x, y, z, u, ...)

Temporal Cartesian Grid 4D

core.TemporalGrid4DFloat64(self, x, y, z, u, ...)

Temporal Cartesian Grid 4D

4D Interpolation Kernels#

Functional 4D interpolation (space + time) routines.

core.quadrivariate_float32(*args, **kwargs)

Overloaded function.

core.quadrivariate_float64(*args, **kwargs)

Overloaded function.

R*Tree#

Spatial index & associated interpolation kernels.

core.RadialBasisFunction

Radial basis functions

core.WindowFunction

Window functions

core.RTree3DFloat32(self[, spheroid])

Create a spatial index for geodetic scalar values.

core.RTree3DFloat64(self[, spheroid])

Create a spatial index for geodetic scalar values.

Replace Undefined Values#

Gap filling routines and supporting types.

core.fill.FirstGuess

Type of first guess grid to solve Poisson's equation.

core.fill.ValueType

Type of values processed by the loess filter

core.fill.fft_inpaint_float32(grid, , , ], ...)

Replace all undefined values (NaN) in a grid using spectral in-painting.

core.fill.fft_inpaint_float64(grid, , , ], ...)

Replace all undefined values (NaN) in a grid using spectral in-painting.

core.fill.gauss_seidel_float32(grid, , ], ...)

Replace all undefined values in a grid using Gauss-Seidel method.

core.fill.gauss_seidel_float64(grid, , ], ...)

Replace all undefined values in a grid using Gauss-Seidel method.

core.fill.loess_float32(*args, **kwargs)

Overloaded function.

core.fill.loess_float64(*args, **kwargs)

Overloaded function.

core.fill.multigrid_float32(grid, , ], ...)

Replace all undefined values (NaN) in a grid using multigrid method.

core.fill.multigrid_float64(grid, , ], ...)

Replace all undefined values (NaN) in a grid using multigrid method.

3D Interpolators#

Object oriented 3D interpolator classes.

core.Bilinear3D

Bilinear interpolation in a 3D space.

core.BivariateInterpolator3D

Bilinear interpolation in a 3D space.

core.InverseDistanceWeighting3D

Inverse distance weighting interpolation in a 3D space.

core.Nearest3D

Nearest interpolation in a 3D space.

Temporal 3D Interpolators#

Object oriented 3D + time interpolator classes.

core.TemporalBilinear3D

Bilinear interpolation in a 3D space.

core.TemporalBivariateInterpolator3D

Bilinear interpolation in a 3D space.

core.TemporalInverseDistanceWeighting3D

Inverse distance weighting interpolation in a 3D space.

core.TemporalNearest3D

Nearest interpolation in a 3D space.

3D Interpolation Kernels#

Vectorized functional 3D interpolation routines.

core.trivariate_float32(*args, **kwargs)

Overloaded function.

core.trivariate_float64(*args, **kwargs)

Overloaded function.