Branch
764-inherited-scalar-shape-export
What happened?
Given the following type definitions:
groups:
- neurodata_type_def: NonScalarData
neurodata_type_inc: NWBContainer
datasets:
- name: data
dtype: float64
shape:
- null
- neurodata_type_def: ScalarDataInherited
neurodata_type_inc: NonScalarData
datasets:
- name: data
shape:
- 1
- neurodata_type_def: ScalarData
neurodata_type_inc: NWBContainer
datasets:
- name: data
dtype: float64
shape:
- 1
ScalarDataInherited and ScalarData are functionally identical, but when exported from MatNWB, ScalarDataInherited is exported as a simple (H5S_SIMPLE) dataset, and ScalarData is exported as a scalar dataset (H5S_SCALAR).
This is because a subclass export method will delegate export of all datasets defined in superclasses to the superclass export method, and the export method implementation in turn will decide whether a dataset should be exported with scalar or simple dataspace type.
Steps to Reproduce
Error Message
Operating System
macOS
Matlab Version
R2023b
Code of Conduct
Branch
764-inherited-scalar-shape-exportWhat happened?
Given the following type definitions:
ScalarDataInheritedandScalarDataare functionally identical, but when exported from MatNWB,ScalarDataInheritedis exported as a simple (H5S_SIMPLE) dataset, andScalarDatais exported as a scalar dataset (H5S_SCALAR).This is because a subclass
exportmethod will delegateexportof all datasets defined in superclasses to the superclassexportmethod, and theexportmethod implementation in turn will decide whether a dataset should be exported with scalar or simple dataspace type.Steps to Reproduce
Error Message
Operating System
macOS
Matlab Version
R2023b
Code of Conduct