diff --git a/src/plopp/widgets/slicing.py b/src/plopp/widgets/slicing.py index 6af78284..0f8c770d 100644 --- a/src/plopp/widgets/slicing.py +++ b/src/plopp/widgets/slicing.py @@ -33,13 +33,13 @@ def __init__( ): self._lock = False self._coord = coord.values - if self._coord.dtype not in (sc.DType.datetime64, sc.DType.string): + if coord.dtype not in (sc.DType.datetime64, sc.DType.string): self._underlying = self._coord self._fmt = ".3E" if layout is None: layout = {"width": "11.5ch"} else: - if self._coord.dtype == sc.DType.datetime64: + if coord.dtype == sc.DType.datetime64: self._underlying = coord.to(unit="ns").values.astype(int) else: self._underlying = self._coord @@ -94,13 +94,13 @@ def __init__( ): self._lock = False self._coord = coord.values - if self._coord.dtype not in (sc.DType.datetime64, sc.DType.string): + if coord.dtype not in (sc.DType.datetime64, sc.DType.string): self._underlying = self._coord self._fmt = ".3E" if layout is None: layout = {"width": "22.5ch"} else: - if self._coord.dtype == sc.DType.datetime64: + if coord.dtype == sc.DType.datetime64: self._underlying = coord.to(unit="ns").values.astype(int) else: self._underlying = self._coord