[Bug]: EpochTags #1449
Labels
category: bug
errors in the code or code behavior
priority: medium
non-critical problem and/or affecting only a small set of NWB users
What happened?
In the
NWBFile.add_epoch
method, the description notes that thetags
input can be str, list or tuple.Tags description:
tags (:py:class:
~str
or :py:class:~list
or :py:class:~tuple
): user-defined tags used throughout time intervalsHowever, if one actually passes a str, then the
epoch_tags
attribute doesn't preserve this as a string, but splits it up into individual elements (characters). In this situation, it makes theepoch_tags
field not very useful. As far as I can tell, this is simply an issue with howeverepoch_tags
samples the tags from theepochs
data, since examining the tags within the epochs structure all looks correct.Options:
epoch_tags
is sampling from epochs is doing some kind of type conversion (callingset
perhaps, though I'm quite sure where) which is going wrong, and this could be updated to better handle strings.Steps to Reproduce
Traceback
No response
Operating System
macOS
Python Executable
Conda
Python Version
3.8
Package Versions
I'm using pynwb version 2.0.1
Code of Conduct
The text was updated successfully, but these errors were encountered: