scipy.ndimage.interpolation.zoom

scipy.ndimage.interpolation.zoom(input, zoom, output=None, order=3, mode='constant', cval=0.0, prefilter=True)

Zoom an array.

The array is zoomed using spline interpolation of the requested order.

Parameters :

input : ndarray

The input array.

zoom : float or sequence, optional

The zoom factor along the axes. If a float, zoom is the same for each axis. If a sequence, zoom should contain one value for each axis.

output : ndarray or dtype, optional

The array in which to place the output, or the dtype of the returned array.

order : int, optional

The order of the spline interpolation, default is 3. The order has to be in the range 0-5.

mode : str, optional

Points outside the boundaries of the input are filled according to the given mode (‘constant’, ‘nearest’, ‘reflect’ or ‘wrap’). Default is ‘constant’.

cval : scalar, optional

Value used for points outside the boundaries of the input if mode='constant'. Default is 0.0

prefilter : bool, optional

The parameter prefilter determines if the input is pre-filtered with spline_filter before interpolation (necessary for spline interpolation of order > 1). If False, it is assumed that the input is already filtered. Default is True.

Returns :

return_value : ndarray or None

The zoomed input. If output is given as a parameter, None is returned.

Previous topic

scipy.ndimage.interpolation.spline_filter1d

Next topic

scipy.ndimage.measurements.center_of_mass

This Page