def resize(self, newshape, refcheck=True, order=False):
<EOL><INDENT>try:<EOL><INDENT>ndarray.resize(self, newshape, refcheck=refcheck)<EOL>if self.mask is not nomask:<EOL><INDENT>self._mask.resize(newshape, refcheck=refcheck)<EOL><DEDENT><DEDENT>except ValueError:<EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>return None<EOL><DEDENT>errmsg = "<STR_LIT>""<STR_LIT>""<STR_LIT>"<EOL>raise ValueError(errmsg)<EOL>
.. warning::

    This method does nothing, except raise a ValueError exception. A
    masked array does not own its data and therefore cannot safely be
    resized in place. Use the `numpy.ma.resize` function instead.

This method is difficult to implement safely and may be deprecated in
future releases of NumPy.