numpy.ma.resize()

numpy.ma.resize

numpy.ma.resize(x, new_shape) [source]

Return a new masked array with the specified size and shape.

This is the masked equivalent of the numpy.resize function. The new array is filled with repeated copies of x (in the order that the data are stored in memory). If x is masked, the new array will be masked, and the new mask will be a repetition of the old one.