-
Notifications
You must be signed in to change notification settings - Fork 89
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
*::flatten and *::count for axis != 0 #51
Comments
See #69 for further discussion of how to interpret negative |
Added `IndexedArray::flatten` for `axis=0` (other cases not covered, just as they're not covered for the other arrays, either). Also added `*::count` (a special-case reducer) for `axis=0` because I thought I needed it. In fact, I also added a version that doesn't depend on `axis` and returns an `Index64` because I thought I need that, too. As it turns out, I was misinterpreting the intended output, and I didn't actually need either `count` method. However, it's probably going to be needed to implement `getitem` slicing for jagged arrays, so I'm leaving it in. The `*::count` reducer should be extended to handle any `axis` value as part of issue #51. The handling is the same as it would be for `*::flatten`, so it should be abstracted out into a helper function. * [WIP] Issue #50: IndexedArray::flatten for axis=0 * Set up arrays for testing IndexedArray::flatten. * Implemented most of IndexedArray::flatten, but IndexedOptionArray case is wrong. * Implemented *::count so that it will be possible to implement IndexedOptionArray, but the latter isn't done yet. * Tests for *::count. * Fix 32-bit. * Need to implement toindex64 to implement IndexedOptionArray::flatten. * [skip ci] toindex64 isn't going to work. * Replace toindex64 with count64 (specifically what we need right now). * Finished IndexedArray::count64. * [skip ci] Working on IndexedOptionArray::flatten (finally). * IndexedOptionArray::flatten is done (and it didn't need counts, after all). * Update signatures. * It was missing some index types.
@ianna I added a lot of issues yesterday, which cover the gap from the present to the minimum viable product for users that is expected at the end of the 6-month sprint. (Every item in the README checklist for the 6-month sprint has been translated into an issue.) I've assigned the array operations to you ( If you're wondering where to get started, it's this one (issue #51), which we discussed before. Looking ahead to operations like the reducers in #69 has consequences for how negative |
Thanks, @jpivarski - Excellent! I thought it was a plan for the end of February :-) I'm done with NumpyArray for |
* build: Add lower bound on awkward of v2.5.0 * The lower bound is empirically determined with ``` uv pip install --upgrade --resolution lowest-direct . && pytest tests/ ``` as v2.5.0 requires awkward-cpp v26+ which is required for attrs to be accessed. - c.f. https://github.com/scikit-hep/awkward/releases/tag/awkward-cpp-26 * ci: Add lower bound requirements tests * Use 'uv pip install --upgrade --resolution lowest-direct' to automatically evaluate if the lower bounds of the dependencies specified are correct. * replace cron-based scheduling with PRs and pushes to main --------- Co-authored-by: Jim Pivarski <[email protected]>
All array types, including
IndexedArray
(andUnionArray
, if it exists when you're ready for it).Discussion of how to interpret negative
axis
here.The text was updated successfully, but these errors were encountered: