MCPcopy Index your code
hub / github.com/PyTables/PyTables / _write_slice

Method _write_slice

tables/array.py:819–830  ·  view source on GitHub ↗

Write `nparr` in a slice based on `startl`, `stopl` and `stepl`.

(
        self,
        startl: np.ndarray,
        stopl: np.ndarray,
        stepl: np.ndarray,
        shape: list[int],
        nparr: np.ndarray,
    )

Source from the content-addressed store, hash-verified

817 return nparr
818
819 def _write_slice(
820 self,
821 startl: np.ndarray,
822 stopl: np.ndarray,
823 stepl: np.ndarray,
824 shape: list[int],
825 nparr: np.ndarray,
826 ) -> None:
827 """Write `nparr` in a slice based on `startl`, `stopl` and `stepl`."""
828 nparr = self._check_shape(nparr, tuple(shape))
829 countl = ((stopl - startl - 1) // stepl) + 1
830 self._g_write_slice(startl, stepl, countl, nparr)
831
832 def _write_coords(self, coords: np.ndarray, nparr: np.ndarray) -> None:
833 """Write `nparr` values in points defined by `coords` coordinates."""

Callers 1

__setitem__Method · 0.95

Calls 1

_check_shapeMethod · 0.95

Tested by

no test coverage detected