Skip to content

Commit 51f048d

Browse files
Ícarostes
andauthored
Set default offset to an Offset object (#180)
* Set default offset to an Offset object (fix #174) * Adapt default offset * Fix import issue caused by ruff Co-authored-by: Steffen Schneider <[email protected]>
1 parent 6008052 commit 51f048d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cebra/data/datasets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import cebra.data as cebra_data
3232
import cebra.helper as cebra_helper
33+
from cebra.data.datatypes import Offset
3334

3435

3536
class TensorDataset(cebra_data.SingleSessionDataset):
@@ -65,7 +66,7 @@ def __init__(self,
6566
neural: Union[torch.Tensor, npt.NDArray],
6667
continuous: Union[torch.Tensor, npt.NDArray] = None,
6768
discrete: Union[torch.Tensor, npt.NDArray] = None,
68-
offset: int = 1,
69+
offset: Offset = Offset(0, 1),
6970
device: str = "cpu"):
7071
super().__init__(device=device)
7172
self.neural = self._to_tensor(neural, check_dtype="float").float()

0 commit comments

Comments
 (0)