Get a set of rows given their indexes as a (record) array. This method works much like the :meth:`Table.read` method, but it uses a sequence (coords) of row indexes to select the wanted columns, instead of a column range. The selected rows are returned in an array o
(
self, coords: np.ndarray, field: str | None = None
)
| 2121 | return result |
| 2122 | |
| 2123 | def read_coordinates( |
| 2124 | self, coords: np.ndarray, field: str | None = None |
| 2125 | ) -> np.ndarray: |
| 2126 | """Get a set of rows given their indexes as a (record) array. |
| 2127 | |
| 2128 | This method works much like the :meth:`Table.read` method, but it uses |
| 2129 | a sequence (coords) of row indexes to select the wanted columns, |
| 2130 | instead of a column range. |
| 2131 | |
| 2132 | The selected rows are returned in an array or structured array of the |
| 2133 | current flavor. |
| 2134 | |
| 2135 | """ |
| 2136 | self._g_check_open() |
| 2137 | result = self._read_coordinates(coords, field) |
| 2138 | return internal_to_flavor(result, self.flavor) |
| 2139 | |
| 2140 | def get_enum(self, colname: str) -> Enum: |
| 2141 | """Get the enumerated type associated with the named column. |