module documentation

ND interpolation for numpy arrays

Function constant Set masked elements to a constant value
Function get_index_boundary_func Undocumented
Function interp Replaces masked elements with linear interpolation of surrounding values in place.
Function mean Replaces masked elements with mean of surrounding values in place.
Type Variable T Undocumented
Variable _lgr Undocumented
def constant(a: np.ndarray[S[N], T], m: np.ndarray[S[N], bool], value: T = 0) -> np.ndarray[S[N], T]:

Set masked elements to a constant value

def get_index_boundary_func(name: str):

Undocumented

def interp(a: np.ndarray[S[N], T], m: np.ndarray[S[N], bool], fix_edges: bool = True, **kwargs) -> np.ndarray[S[N], T]:

Replaces masked elements with linear interpolation of surrounding values in place.

Parameters
a:np.ndarray[S[N], T]np.ndarray A numpy array of pixel data
m:np.ndarray[S[N], bool]np.ndarray
fix_edges:boolUndocumented
**kwargsUndocumented
Returns
np.ndarray[S[N], T]Undocumented
def mean(a: np.ndarray[S[N], T], m: np.ndarray[S[N], bool], window: np.ndarray[Q[M], bool] | Q[M] | int = 3, boundary: str = 'reflect', const: T = 0) -> np.ndarray[S[N], T]:

Replaces masked elements with mean of surrounding values in place.

Parameters
a:np.ndarray[S[N], T]np.ndarray[T] A numpy array of pixel data
m:np.ndarray[S[N], bool]np.ndarray[bool] A mask of the elements of a to replace
window:np.ndarray[Q[M], bool] | Q[M] | intnp.ndarray[bool] | tuple[int,...] | int The surrounding values we should use in the mean calculation. NANs and INFs will be ignored. If an np.ndarray[bool] will use the True elements as memmbers of the calculation, if a tuple will create a mask by using each element of the tuple as a manhattan distance from the point whose mean is being calculated, if an integer will use the same manhattan distance for each axis.
boundary:strstr How boundaries are handled, one of ['pacman','const','reflect']
const:TT Value
Returns
np.ndarray[S[N], T]Undocumented
T =

Undocumented

Value
TypeVar('T')
_lgr =

Undocumented