MCPcopy Create free account
hub / github.com/numpy/numpy / reshape

Function reshape

numpy/ma/core.py:7358–7374  ·  view source on GitHub ↗

Returns an array containing the same data with a new shape. Refer to `MaskedArray.reshape` for full documentation. See Also -------- MaskedArray.reshape : equivalent function

(a, new_shape, order='C')

Source from the content-addressed store, hash-verified

7356
7357
7358def reshape(a, new_shape, order='C'):
7359 """
7360 Returns an array containing the same data with a new shape.
7361
7362 Refer to `MaskedArray.reshape` for full documentation.
7363
7364 See Also
7365 --------
7366 MaskedArray.reshape : equivalent function
7367
7368 """
7369 # We can't use 'frommethod', it whine about some parameters. Dmmit.
7370 try:
7371 return a.reshape(new_shape, order=order)
7372 except AttributeError:
7373 _tmp = narray(a, copy=False).reshape(new_shape, order=order)
7374 return _tmp.view(MaskedArray)
7375
7376
7377def resize(x, new_shape):

Callers 3

user_array.pyFile · 0.90
test_on_ndarrayMethod · 0.90
__getitem__Method · 0.70

Calls 2

reshapeMethod · 0.80
viewMethod · 0.45

Tested by 1

test_on_ndarrayMethod · 0.72