MCPcopy Index your code
hub / github.com/numpy/numpy / resize

Method resize

numpy/ma/core.py:4819–4835  ·  view source on GitHub ↗

.. 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 s

(self, newshape, refcheck=True, order=False)

Source from the content-addressed store, hash-verified

4817 return result
4818
4819 def resize(self, newshape, refcheck=True, order=False):
4820 """
4821 .. warning::
4822
4823 This method does nothing, except raise a ValueError exception. A
4824 masked array does not own its data and therefore cannot safely be
4825 resized in place. Use the `numpy.ma.resize` function instead.
4826
4827 This method is difficult to implement safely and may be deprecated in
4828 future releases of NumPy.
4829
4830 """
4831 # Note : the 'order' keyword looks broken, let's just drop it
4832 errmsg = "A masked array does not own its data "\
4833 "and therefore cannot be resized.\n" \
4834 "Use the numpy.ma.resize function instead."
4835 raise ValueError(errmsg)
4836
4837 def put(self, indices, values, mode='raise'):
4838 """

Callers 15

testResize0Method · 0.80
testResize1Method · 0.80
testResize0Method · 0.80
testResize1Method · 0.80
testResize0Method · 0.80
testResize1Method · 0.80
test_resize_methodFunction · 0.80
test_attributesMethod · 0.80
test_resizeMethod · 0.80
test_basicMethod · 0.80

Calls

no outgoing calls

Tested by 15

testResize0Method · 0.64
testResize1Method · 0.64
testResize0Method · 0.64
testResize1Method · 0.64
testResize0Method · 0.64
testResize1Method · 0.64
test_resize_methodFunction · 0.64
test_attributesMethod · 0.64
test_resizeMethod · 0.64
test_basicMethod · 0.64