ee.Array.reshape
Reshapes an array to a new list of dimension lengths.
Usage | Returns |
---|
Array.reshape(shape) | Array |
Argument | Type | Details |
---|
this: array | Array | Array to reshape. |
shape | Array | New shape to which arrays are converted. If one component of the shape is the special value -1, the size of that dimension is computed so that the total size remains constant. In particular, a shape of [-1] flattens into 1-D. At most one component of shape can be -1. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["The `reshape` method modifies the structure of an array without changing its data."],["It allows you to specify a new shape using the `shape` argument, which is an array of dimension lengths."],["A `-1` within the `shape` array automatically calculates the size of that dimension to maintain the total number of elements."]]],[]]