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')
| 7356 | |
| 7357 | |
| 7358 | def 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 | |
| 7377 | def resize(x, new_shape): |