ee.Array.reshape
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
reshape מערך לרשימה חדשה של אורכי מאפיינים.
שימוש | החזרות |
---|
Array.reshape(shape) | מערך |
ארגומנט | סוג | פרטים |
---|
זה: array | מערך | מערך לשינוי הצורה. |
shape | מערך | הצורה החדשה שאליה המערכים יומרו. אם אחד מהרכיבים של הצורה הוא הערך המיוחד -1, הגודל של המימד הזה מחושב כך שהגודל הכולל יישאר קבוע. בפרט, צורה של [-1] משוטחת ל-1D. רכיב אחד לכל היותר של הצורה יכול להיות -1. |
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 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. |"]]