ee.Array.pad
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
یک آرایه را به طول مشخصی اضافه کنید. مقدار پد به طور مکرر به آرایه اضافه می شود تا آن را به طول معین در امتداد هر محور گسترش دهد. اگر آرایه از قبل به اندازه طول مشخصی بزرگ یا بزرگتر باشد، در طول آن محور بدون تغییر باقی می ماند.
استفاده | برمی گرداند | Array. pad (lengths, pad ) | آرایه |
استدلال | تایپ کنید | جزئیات | این: array | آرایه | آرایه به پد. |
lengths | فهرست کنید | لیستی از طول های جدید برای هر محور. |
pad | تعداد، پیش فرض: 0 | مقداری که با آن آرایه را pad کنید. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003e\u003ccode\u003eArray.pad\u003c/code\u003e extends an array to specified lengths along each axis using a provided pad value.\u003c/p\u003e\n"],["\u003cp\u003eIf the array's existing length is equal to or greater than the given length for an axis, it remains unmodified along that axis.\u003c/p\u003e\n"],["\u003cp\u003eThe padding operation utilizes a specified pad value, defaulting to 0, which is appended to the array.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eArray.pad\u003c/code\u003e takes the array, target lengths, and pad value as input and returns the modified array.\u003c/p\u003e\n"]]],["The core function pads an array to specified lengths along each axis by appending a designated `pad` value. If the array's dimension along any axis is already greater than or equal to the given length, it remains unmodified. The method `Array.pad` takes a list of `lengths` and a `pad` value (defaulting to 0) as arguments. It returns the modified, padded `array`.\n"],null,["# ee.Array.pad\n\nPad an array to a given length. The pad value will be repeatedly appended to the array to extend it to given length along each axis. If the array is already as large or larger than a given length, it will remain unchanged along that axis.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------|---------|\n| Array.pad`(lengths, `*pad*`)` | Array |\n\n| Argument | Type | Details |\n|---------------|--------------------|----------------------------------------|\n| this: `array` | Array | Array to pad. |\n| `lengths` | List | A list of new lengths for each axis. |\n| `pad` | Number, default: 0 | The value with which to pad the array. |"]]