Closed rly closed 4 years ago
Based on the graphic in the NWB preprint which is also here: https://github.com/hdmf-dev/hdmf-common-schema/blob/master/docs/source/figures/ragged-array.png
the docstring for VectorIndex is wrong: https://github.com/hdmf-dev/hdmf-common-schema/blob/b22b352851db5b925e142f036187ad25e5ffb9d4/common/table.yaml#L11-L13
VectorIndex
I think I wrote this incorrectly months ago. It should say: The first vector is at VectorData[0:VectorIndex[0]]. The second vector is at VectorData[VectorIndex[0]:VectorIndex[1]].
The first vector is at VectorData[0:VectorIndex[0]]. The second vector is at VectorData[VectorIndex[0]:VectorIndex[1]].
example:
>>> from hdmf.common import VectorData, VectorIndex >>> foo = VectorData(name='foo', description='foo column', data=['a', 'b', 'c', 'd']) >>> foo_ind = VectorIndex(name='foo_index', target=foo, data=[2, 4]) >>> foo_ind[0] ['a', 'b']
Based on the graphic in the NWB preprint which is also here: https://github.com/hdmf-dev/hdmf-common-schema/blob/master/docs/source/figures/ragged-array.png
the docstring for
VectorIndex
is wrong: https://github.com/hdmf-dev/hdmf-common-schema/blob/b22b352851db5b925e142f036187ad25e5ffb9d4/common/table.yaml#L11-L13I think I wrote this incorrectly months ago. It should say:
The first vector is at VectorData[0:VectorIndex[0]]. The second vector is at VectorData[VectorIndex[0]:VectorIndex[1]].
example: