Select bands from each image in a collection. Args: selectors: An array of names, regexes or numeric indices specifying the bands to select. names: An array of strings specifying the new names for the selected bands. If supplied, the length must match the number of b
(
self, selectors: Any, names: Any | None = None, *args
)
| 106 | @_utils.accept_opt_prefix('opt_names') |
| 107 | # pylint: disable-next=keyword-arg-before-vararg |
| 108 | def select( |
| 109 | self, selectors: Any, names: Any | None = None, *args |
| 110 | ) -> ImageCollection: |
| 111 | """Select bands from each image in a collection. |
| 112 | |
| 113 | Args: |
| 114 | selectors: An array of names, regexes or numeric indices specifying the |
| 115 | bands to select. |
| 116 | names: An array of strings specifying the new names for the selected |
| 117 | bands. If supplied, the length must match the number of bands selected. |
| 118 | *args: Selector elements as varargs. |
| 119 | |
| 120 | Returns: |
| 121 | The image collection with selected bands. |
| 122 | """ |
| 123 | return self.map(lambda img: img.select(selectors, names, *args)) |
| 124 | |
| 125 | # Disable argument usage check; arguments are accessed using locals(). |
| 126 | # pylint: disable=unused-argument,g-bad-name |
no test coverage detected