Pengumuman: Semua project nonkomersial yang terdaftar untuk menggunakan Earth Engine sebelum
15 April 2025 harus
memverifikasi kelayakan nonkomersial untuk mempertahankan akses Earth Engine.
ee.Array.reshape
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Membentuk ulang array menjadi daftar baru panjang dimensi.
Penggunaan | Hasil |
---|
Array.reshape(shape) | Array |
Argumen | Jenis | Detail |
---|
ini: array | Array | Array untuk mengubah bentuk. |
shape | Array | Bentuk baru yang akan dikonversi menjadi array. Jika salah satu komponen bentuk adalah nilai khusus -1, ukuran dimensi tersebut dihitung sehingga total ukuran tetap konstan. Secara khusus, bentuk [-1] diratakan menjadi 1-D. Paling banyak satu komponen bentuk dapat berupa -1. |
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 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. |"]]