Skip to content

Commit ce7bf27

Browse files
authored
Spatial series shape (#743)
allow for 1D data in SpatialSeries
1 parent 0ca569f commit ce7bf27

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/pynwb/behavior.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class SpatialSeries(TimeSeries):
2525
_help = "Stores points in space over time. The data[] array structure is [num samples][num spatial dimensions]"
2626

2727
@docval({'name': 'name', 'type': str, 'doc': 'The name of this SpatialSeries dataset'},
28-
{'name': 'data', 'type': ('array_data', 'data', TimeSeries), 'shape': (None, None),
28+
{'name': 'data', 'type': ('array_data', 'data', TimeSeries), 'shape': ((None, ), (None, None)),
2929
'doc': 'The data this TimeSeries dataset stores. Can also store binary data e.g. image frames'},
3030
{'name': 'reference_frame', 'type': str, 'doc': 'description defining what the zero-position is'},
3131
{'name': 'conversion', 'type': float,
32-
'doc': 'Scalar to multiply each element by to conver to meters',
32+
'doc': 'Scalar to multiply each element by to convert to meters',
3333
'default': _default_conversion},
3434
{'name': 'resolution', 'type': float,
3535
'doc': 'The smallest meaningful difference (in specified unit) between values in data',

src/pynwb/data/nwb.behavior.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ groups:
3131
default_value: meter
3232
required: false
3333
dims:
34-
- num_times
35-
- num_features
34+
- - num_times
35+
- - num_times
36+
- num_features
3637
shape:
37-
- null
38-
- null
38+
- - null
39+
- - null
40+
- null
3941
- name: reference_frame
4042
dtype: text
4143
doc: Description defining what exactly 'straight-ahead' means.

0 commit comments

Comments
 (0)