Read a set of points defined by `coords`.
(self, coords: np.ndarray)
| 779 | return nparr |
| 780 | |
| 781 | def _read_coords(self, coords: np.ndarray) -> np.ndarray: |
| 782 | """Read a set of points defined by `coords`.""" |
| 783 | nparr = np.empty(dtype=self.atom.dtype, shape=len(coords)) |
| 784 | if len(coords) > 0: |
| 785 | self._g_read_coords(coords, nparr) |
| 786 | # For zero-shaped arrays, return the scalar |
| 787 | if nparr.shape == (): |
| 788 | nparr = nparr[()] |
| 789 | return nparr |
| 790 | |
| 791 | def _read_selection( |
| 792 | self, |