module documentation
ND interpolation for numpy arrays
| Function | constant |
Set masked elements to a constant value |
| Function | get |
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 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[ | np.ndarray[T] A numpy array of pixel data |
m:np.ndarray[ | np.ndarray[bool] A mask of the elements of a to replace |
window:np.ndarray[ | np.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:str | str How boundaries are handled, one of ['pacman','const','reflect'] |
const:T | T Value |
| Returns | |
np.ndarray[ | Undocumented |