Skip to content
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

[Bug]: IndexError for empty arrays #49

Closed
1 task done
JoschD opened this issue Aug 31, 2022 · 0 comments
Closed
1 task done

[Bug]: IndexError for empty arrays #49

JoschD opened this issue Aug 31, 2022 · 0 comments
Labels
Estimate: Easy Good first issue for newcomers. Straightforward fixes. Type: Bug Something isn't working as it should.

Comments

@JoschD
Copy link
Member

JoschD commented Aug 31, 2022

Documentation

  • Yes

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:

return [len(value)] + get_dimensions_from_array(value[0])

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?

@fsoubelet fsoubelet added Type: Bug Something isn't working as it should. help wanted Estimate: Easy Good first issue for newcomers. Straightforward fixes. labels Aug 31, 2022
Dronakurl added a commit to Dronakurl/sdds that referenced this issue Dec 11, 2023
@JoschD JoschD closed this as completed in b64217e Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Estimate: Easy Good first issue for newcomers. Straightforward fixes. Type: Bug Something isn't working as it should.
Projects
None yet
Development

No branches or pull requests

2 participants