-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to write multidimensional string arrays #1173
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1173 +/- ##
=======================================
Coverage 88.88% 88.89%
=======================================
Files 45 45
Lines 9835 9839 +4
Branches 2795 2797 +2
=======================================
+ Hits 8742 8746 +4
Misses 776 776
Partials 317 317 ☔ View full report in Codecov by Sentry. |
@rly I realized that I had only updated the string conversion for datasets so I updated For testing, I added an additional |
Motivation
Fixes #1137 and fixes #1096.
On build, multidimensional string lists/arrays were being converted into 1-D lists/arrays:
[['aa', 'bb'], ['cc', 'dd']] -> ["['aa', 'bb']", "['cc', 'dd']"]
.On write, the shape of a multidimensional string dataset was being defined incorrectly and so the dataset could not be written. The data shape definition was being caught by this conditional that I believe is intended to check for structured arrays / compound data types:
hdmf/src/hdmf/backends/hdf5/h5tools.py
Lines 1472 to 1473 in 7426275
I updated the conditional and
get_data_shape
is now used to set the shape of the dataset for multidimensional string lists/arrays.How to test the behavior?
This came up in NeurodataWithoutBorders/pynwb#1924.
Checklist
CHANGELOG.md
with your changes?