expand_array¶
- sofia_redux.instruments.forcast.register_datasets.expand_array(arr, shape, missing=nan)[source]¶
Expands an array to a new shape
New shape must be greater than the original in both dimensions. Original data will be inserted in the lower left corner (0, 0). The right and upper border will be filled with
missing
.- Parameters:
- arrnumpy.ndarray
array to expand (nrow, ncol)
- shapearray_like
(y, x) dimensions of new shape
- missingfloat, optional
value with which to fill the right and upper borders after expansion.
- Returns:
- numpy.ndarray
expanded array (shape[0], shape[1])