Skip to content

Commit

Permalink
Add explicit casting to avoid windows error
Browse files Browse the repository at this point in the history
  • Loading branch information
stes authored Oct 27, 2024
1 parent 5b24721 commit e02b9a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cebra/data/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ def _to_tensor(
f"Array has type {array.dtype} instead of {check_dtype}.")
if cebra_helper._is_floating(array):
array = array.float()
if cebra_helper._is_integer(array):
# NOTE(stes): Required for standardizing number format on
# windows machines.
array = array.long()
return array

@property
Expand Down

0 comments on commit e02b9a8

Please sign in to comment.