Many of the Interval object creation examples in the repo specify start and end as lists of ints, e.g.:
from torch_brain.data import Interval
trials=Interval(
start=[0, 1, 2],
end=[1, 2, 3],
go_cue_time=[0.5, 1.5, 2.5],
drifting_gratings_dir=[0, 45, 90],
)
As a result, they throw the warning:
WARNING:root:start is of type int64 not of type float64.
WARNING:root:end is of type int64 not of type float64.
Two issues:
- This occurs in several locations in the repo:
- What the warning refers to may not be obvious to the user if they are creating a complex object.
Suggested fixes:
- Update all examples to use
start=[0.0, 1.0, 2.0] and end=[1.0, 2.0, 3.0] (except the warning test line specified above).
- Add a bit of info to the warning (and update what the warning test checks for accordingly):
logging.warning(f"{name} is of type {value.dtype} not of type float64.") ->
logging.warning(f"Interval {name} is of type {value.dtype} not of type float64.").
The fixes could be incorporated into the same PR as for #338.
Many of the
Intervalobject creation examples in the repo specify start and end as lists of ints, e.g.:As a result, they throw the warning:
Two issues:
README.md:L78data.py:L62interval.py:L688test_data.py, though note L332 which intentionally tests for this warning.Suggested fixes:
start=[0.0, 1.0, 2.0]andend=[1.0, 2.0, 3.0](except the warning test line specified above).logging.warning(f"{name} is of type {value.dtype} not of type float64.")->logging.warning(f"Interval {name} is of type {value.dtype} not of type float64.").The fixes could be incorporated into the same PR as for #338.