-
Notifications
You must be signed in to change notification settings - Fork 53
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
Value with integers/indices in select param does not reduce dimensions #88
Comments
Sure, it's actually pretty easy to do from the server side. Take a look at this commit: 71f342f. I didn't want to break any existing clients, so to get the reduce dim effect, you need to add a parameter: "reduce_dim" in the request. |
I've merged this change into master. |
closing issue - please reopen if you run into any problems. |
I tried and it works but the behaviour is different from what I would expect (which would be NumPy like). For example, let's consider the dataset of dimensions
All is well here. Now imagine the dimensions of the original dataset are
In this case, the result with
As for #87, we worked around this in h5web. We do not make use of |
When fetching a slice with
select
with integers/indices, I would expect the number of dimensions to be reduced.Ex: I want to fetch the first row
0,:
from a 2D array of dimensions[2, 3]
. Currently, the fetch gives me a 2D array of dimensions[1, 3]
while I would expect a 1D array of dimensions[3]
.Looking at my fix at #85, I understand the behaviour: integers are converted in slices of 1 elements.
Do you think it would be possible to not make this conversion and treat indices apart ?
The text was updated successfully, but these errors were encountered: