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

QDataSet slice1 of zero-length array shows index out of bounds #103

Open
jbfaden opened this issue Mar 27, 2024 · 1 comment
Open

QDataSet slice1 of zero-length array shows index out of bounds #103

jbfaden opened this issue Mar 27, 2024 · 1 comment

Comments

@jbfaden
Copy link
Member

jbfaden commented Mar 27, 2024

Sadie has a Jython script which loads data and then uses slice1 to get separate components, and this fails with an index-out-of-bounds. This is an equivalent script:

xy= randn(0,2)
x= xy[:,0]
y= xy[:,1]

This should be supported because QUBE datasets allow for length(0) to be called when there is no zeroth record.

What makes this ticket-worthy is it's not clear what should happen when the data is a non-qube. The logic is the old behavior, but I'm sure there are many non-qubes which slice1 property when they have at least one record.

@jbfaden
Copy link
Member Author

jbfaden commented Mar 27, 2024

Datasets identified as qubes will slice properly now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant