[Bug]: IndexError for empty arrays #49
Labels
Estimate: Easy
Good first issue for newcomers. Straightforward fixes.
Type: Bug
Something isn't working as it should.
Documentation
Operating System
Any
Python Version
Any
Package Version
0.3.0
Bug Description
If there is an empty array or an array of empty arrays, the writing function will fail with an index error in:
sdds/sdds/writer.py
Line 81 in f74e04d
Steps to Reproduce
No response
Relevant output
No response
Possible Fix Implementation
Possible solution could be
return [len(value)] + get_dimensions_from_array(value[0]) if len(value) else []
but needs to be tested if this would read okay. Or if empty arrays should be allowed in the first place?
The text was updated successfully, but these errors were encountered: