Skip to content

Commit 962838e

Browse files
authored
epoch start and stop time accept single and double precision (#885)
* epoch start and stop time accept single and double precision * add native float
1 parent 10c5474 commit 962838e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pynwb/epoch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .core import DynamicTable, ElementIdentifiers
99

1010
import pandas as pd
11+
import numpy as np
1112

1213

1314
@register_class('TimeIntervals', CORE_NAMESPACE)
@@ -36,8 +37,8 @@ class TimeIntervals(DynamicTable):
3637
def __init__(self, **kwargs):
3738
call_docval_func(super(TimeIntervals, self).__init__, kwargs)
3839

39-
@docval({'name': 'start_time', 'type': float, 'doc': 'Start time of epoch, in seconds'},
40-
{'name': 'stop_time', 'type': float, 'doc': 'Stop time of epoch, in seconds'},
40+
@docval({'name': 'start_time', 'type': (float, np.float32, np.float64), 'doc': 'Start time of epoch, in seconds'},
41+
{'name': 'stop_time', 'type': (float, np.float32, np.float64), 'doc': 'Stop time of epoch, in seconds'},
4142
{'name': 'tags', 'type': (str, list, tuple), 'doc': 'user-defined tags used throughout time intervals',
4243
'default': None},
4344
{'name': 'timeseries', 'type': (list, tuple, TimeSeries), 'doc': 'the TimeSeries this epoch applies to',

0 commit comments

Comments
 (0)