Skip to content

Index

subsurfaceio.scipy_utils

Shared SciPy helpers.

from subsurfaceio.scipy_utils import interpolate1d
import numpy as np

f = interpolate1d(np.array([1.0, 10.0]), np.array([2.0, 20.0]), xspace='log')
f(np.array([3.0]))

Classes:

Name Description
interpolate1d

Extends scipy.interpolate.interp1d to interpolate/extrapolate in log space.

interpolate1d

Bases: interp1d

Extends scipy.interpolate.interp1d to interpolate/extrapolate in log space.

Source: https://github.com/scipy/scipy/issues/15146#issuecomment-1089402272

This class wraps the standard 1D interpolator to automatically transform the input coordinates and/or dependent values into base-10 logarithmic space before interpolation, and maps the outputs back upon evaluation.

Attributes:

Name Type Description
xspace Literal['linear', 'log']

The chosen coordinate space for the x-axis ('linear' or 'log').

yspace Literal['linear', 'log']

The chosen coordinate space for the y-axis ('linear' or 'log').

xspace instance-attribute

xspace: Literal['linear', 'log'] = xspace

yspace instance-attribute

yspace: Literal['linear', 'log'] = yspace