tophu.upsample_nearest
- tophu.upsample_nearest(data, out_shape)
Upsample an array using nearest neighbor interpolation.
The upsampled data is formed by duplicating elements in the input array. If any upsampled dimension is not an integer multiple of the input dimension, the last input sample along that axis will be repeated additional times to fill the remaining samples in the output.
- Parameters
- datadask.array.Array
The input array.
- out_shapeint or iterable of int
The desired shape of the output array after upsampling. Must be greater than or equal to the input array shape.
- Returns
- outdask.array.Array
The upsampled array with shape out_shape.
See also