ee.Array.reshape
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Formt ein Array in eine neue Liste von Dimensionslängen um.
Nutzung | Ausgabe |
---|
Array.reshape(shape) | Array |
Argument | Typ | Details |
---|
So gehts: array | Array | Das Array, das umgeformt werden soll. |
shape | Array | Neue Form, in die Arrays konvertiert werden. Wenn eine Komponente der Form der Sonderwert -1 ist, wird die Größe dieser Dimension so berechnet, dass die Gesamtgröße konstant bleibt. Insbesondere wird eine Form von [-1] in eine 1-dimensionale Form umgewandelt. Höchstens eine Komponente der Form kann -1 sein. |
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[[["\u003cp\u003eThe \u003ccode\u003ereshape\u003c/code\u003e method modifies the structure of an array without changing its data.\u003c/p\u003e\n"],["\u003cp\u003eIt allows you to specify a new shape using the \u003ccode\u003eshape\u003c/code\u003e argument, which is an array of dimension lengths.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003e-1\u003c/code\u003e within the \u003ccode\u003eshape\u003c/code\u003e array automatically calculates the size of that dimension to maintain the total number of elements.\u003c/p\u003e\n"]]],[],null,["# ee.Array.reshape\n\nReshapes an array to a new list of dimension lengths.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|------------------------|---------|\n| Array.reshape`(shape)` | Array |\n\n| Argument | Type | Details |\n|---------------|-------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `array` | Array | Array to reshape. |\n| `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. |"]]