Open CodyCBakerPhD opened 1 year ago
Looking at the code for set_dataio
and DataIO
, I think the two functions have diverged a bit, in that set_dataio
expected a DataIO
object without data and then sets the data, whereas DataIO
now checks that data
or dtype
/shape
are set. For this to work, I think we'll need to update DataIO
to have an option to allow deferred setting of data
Currently, I think you would need to:
nwbfile.trials.start_time.set_dataio(H5DataIO(data=nwbfile.trials.start_time.data))
which kind of defeats the purpose of set_dataio
What happened?
Trying to use the
set_dataio
method on aVectorData
object to compress data that has been added by rowUsing the trials table as a simple example, see code for my failed attempts based off of looking at https://github.com/hdmf-dev/hdmf/blob/2a42e4194853b856fe8b13a121d326b3d3d91de6/tests/unit/utils_test/test_core_DataIO.py#L38
How should this be done?
Steps to Reproduce
Traceback
No response
Operating System
Windows
Python Executable
Python
Python Version
3.9
Package Versions
No response
Code of Conduct