-
Notifications
You must be signed in to change notification settings - Fork 87
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
Layout indexes don't support slices #333
Labels
feature
New feature or request
Comments
nsmith-
added
the
bug (unverified)
The problem described would be a bug, but needs to be triaged
label
Jul 13, 2020
jpivarski
added
feature
New feature or request
and removed
bug (unverified)
The problem described would be a bug, but needs to be triaged
labels
Jul 13, 2020
Since this is a known fact about these low-level objects, it might make more sense to call this a feature request. But yeah, it would definitely make life easier for developers who are building things on top of Awkward if they could treat |
14 tasks
14 tasks
jpivarski
added a commit
that referenced
this issue
Jul 16, 2020
* Test 32-bit and 64-bit Windows format strings. * Restore buildtest. * Added util::dtype enum and converters. * NumpyArray and NumpyForm take a util::dtype argument. * Replaced one #ifdef _MSC_VER. * Centralized 'dtype_name'. * Replaced PrimitiveType::Dtype with the new util::dtype. * Reducer.preferred_type and Reducer.return_type are no longer used. * Removed 'format' dependence from reducers, considerably simplifying them. * Removed 'format_' from 'tostring_part'. * Put Windows/32-bit integer promotion rules back in. * Removed '#ifdef' from 'tojson_part'. * Removed '#ifdef' from 'mergeable'. * Removed '#ifdef' from 'merge', but its behavior does not match np.concatenate. * Merge (ak.concatenate) follows the same type-promotion rules as np.concatenate. * Removed '#ifdef' from 'sort' and 'argsort'. * Removed '#ifdef' from 'copy_to'. * All compiler '#if' checks for interpreting 'format' are replaced by 'dtype' now. * Fixed #333. * Form.from_numpy now exists.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes, when building arrays at a low level, it is useful to manipulate
Index64
and similar from python.The usual getitem method does not accept python slices, however:
gives:
Amusingly, one can do
a.layout.offsets.__getitem__(0, -1)
The text was updated successfully, but these errors were encountered: