[Bug]: Constructing "container" class with name-value pair where name matches property name does not work #676
Labels
category: bug
errors in the code or code behavior
topic: matnwb-api
related to improving the matnwb api
What happened?
Some neurodata types are containers for other neurodata types, for example BehavioralEpochs.
The
types.core.BehavioralEpochs
class in MatNWB has one property,intervalseries
. The value of theintervalseries
property should be atypes.untyped.Set
that can contain one or moretypes.core.IntervalSeries
objects.The BehavioralEpochs constructor has this line:
matnwb/+types/+core/BehavioralEpochs.m
Line 29 in 806b67d
who is assigning named IntervalSeries objects as members of a set in the
intervalseries
property.However, the
types.util.parseConstrained
will ignore IntervalSeries objects if the name matches the property name (See examples below)Steps to Reproduce
Adds the IntervalSeries object to the set:
When the name of the input matches the propertyname this produces a set with no elements:
Error Message
Operating System
macOS
Matlab Version
R2023b
Code of Conduct
The text was updated successfully, but these errors were encountered: