ee.Array.repeat
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Wiederholt das Array entlang der angegebenen Achse. Das Ergebnis hat die Form der Eingabe, mit der Ausnahme, dass die Länge entlang der wiederholten Achse mit der angegebenen Anzahl von Kopien multipliziert wird.
Nutzung | Ausgabe |
---|
Array.repeat(axis, copies) | Array |
Argument | Typ | Details |
---|
So gehts: array | Array | Das Array, das wiederholt werden soll. |
axis | Ganzzahl, Standardwert: 0 | Die Achse, entlang der das Array wiederholt werden soll. |
copies | Ganzzahl, Standard: 2 | Die Anzahl der Kopien dieses Arrays, die entlang der angegebenen Achse verkettet werden sollen. |
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\u003e\u003ccode\u003eArray.repeat()\u003c/code\u003e creates a new array by repeating the original array along a specified axis.\u003c/p\u003e\n"],["\u003cp\u003eThe size of the new array remains the same except for the specified axis, which is multiplied by the number of copies.\u003c/p\u003e\n"],["\u003cp\u003eYou can control which axis to repeat along and how many times using the \u003ccode\u003eaxis\u003c/code\u003e and \u003ccode\u003ecopies\u003c/code\u003e parameters.\u003c/p\u003e\n"],["\u003cp\u003eIt's a convenient way to expand an array by duplicating its elements.\u003c/p\u003e\n"]]],[],null,["# ee.Array.repeat\n\nRepeats the array along the given axis. The result will have the shape of the input, except length along the repeated axis will be multiplied by the given number of copies.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|---------------------------------------|---------|\n| Array.repeat`(`*axis* `, `*copies*`)` | Array |\n\n| Argument | Type | Details |\n|---------------|---------------------|-------------------------------------------------------------------------|\n| this: `array` | Array | Array to repeat. |\n| `axis` | Integer, default: 0 | The axis along which to repeat the array. |\n| `copies` | Integer, default: 2 | The number of copies of this array to concatenate along the given axis. |"]]