Awkward-array
awkward-array.org › doc › main › user-guide › how-to-filter.html
Filtering data — Awkward Array 2.13.0 documentation
The user guide is a collection of “how to…” guides for common tasks. See the left side-bar (or bring it into view by clicking on the upper-left ≡) to access the guides, grouped by topic · If you’re looking for documentation on a specific function, see the API reference instead
Awkward-array
awkward-array.org › doc › main › user-guide › how-to-filter-ragged.html
How to filter with ragged arrays — Awkward Array 2.13.0 documentation
Instead of pulling out the smallest items in array along axis=1, we have simply re-arranged the sublists of array along axis=0. Our index has only a single dimension, so for each value in ak.argmin(array, axis=-1), Awkward pulls out the corresponding item from array.
Awkward-array
awkward-array.org › doc › main › user-guide › how-to-filter-num.html
How to filter arrays by number of items — Awkward Array 2.8.8 documentation
In general, arrays are filtered using NumPy-like slicing.
Awkward-array
awkward-array.org › how-to-filter.html
Filtering data
Slicing lists within arrays · Slices with missing values
scverse
discourse.scverse.org › help › scirpy
How to edit and filter awkward array created by scirpy? - scirpy - scverse
August 3, 2023 - I used scirpy to read an AIRR table generated by MiXCR. The v/d/j/c_call columns have “*00” added to the end of the gene that I want to remove. scirpy has functions for retrieving values, but I can’t figure out how to directly edit the awkward array. For example, mdata.mod['airr'].obsm['airr'][0][0]['c_call'] gives “TRBC1*00”. After assigning a value manually, mdata.mod['airr'].obsm['airr'][0][0]['c_call'] = "TRBC1".
Awkward-array
awkward-array.org › doc › main › user-guide › how-to-filter-masked.html
How to filter with arrays containing missing values — Awkward Array 2.9.0 documentation
array = ak.Array( [ [], [10, 3, 2, 9], [4, 5, 5, 12, 6], [], [8, 9, -1], ] ) array · [[], [10, 3, 2, 9], [4, 5, 5, 12, 6], [], [8, 9, -1]] ------------------ backend: cpu nbytes: 144 B type: 5 * var * int64 · Awkward reducers accept a mask_identity argument, which changes the ak.Array.type and the values of the result:
Awkward-array
awkward-array.org › doc › 2.0 › user-guide › how-to-filter-cut-mask.html
How to filter arrays: cutting vs. masking — Awkward Array 2.0.4 documentation
This is a stub: I intend to write this article, but haven’t yet · If you need it soon, create an issue saying so and I’ll make it a higher priority
Stack Overflow
stackoverflow.com › questions › 73328284 › filtering-events-in-awkward-array
numpy - filtering "events" in awkward-array - Stack Overflow
The reason I say that is because you can use np.isfinite on these NumPy arrays. (There's an equivalent in Awkward v1, v2, but you're talking about Awkward v0 and I don't remember.) That will give you an array of booleans for you to slice these arrays.
Awkward-array
awkward-array.org › doc › 2.5 › user-guide › how-to-filter-cut-mask.html
How to filter arrays: cutting vs. masking — Awkward Array 2.5.2 documentation
This is a stub: I intend to write this article, but haven’t yet · If you need it soon, create an issue saying so and I’ll make it a higher priority
GitHub
github.com › scikit-hep › awkward › discussions › 1287
Filtering a Jagged Array with no fields · scikit-hep/awkward · Discussion #1287
and I would like to filter/mask the inner values of the array (e.g. mask elements <= 1 such that arr -> [[None,2,3],[4,5] ). I know how to do this if I have a field, since it's a simple `arr.field > X', but in this case the array has no fields. ... Thank you very much. Beta Was this translation helpful? Give feedback. ... Something went wrong. ... Something went wrong. ... The masking and filtering features in NumPy / Awkward are actually orthogonal (unrelated) to the fields feature.
Author: scikit-hep
Awkward-array
awkward-array.org › doc › 2.1 › user-guide › how-to-filter-cut-mask.html
How to filter arrays: cutting vs. masking — Awkward Array 2.1.4 documentation
This is a stub: I intend to write this article, but haven’t yet · If you need it soon, create an issue saying so and I’ll make it a higher priority
Awkward-array
awkward-array.org › doc › main › reference › generated › ak.Array.html
ak.Array — Awkward Array 2.13.0 documentation
This kind of slicing is useful because NumPy’s universal functions produce arrays with the same structure as the original array, which can then be used as filters.
Awkward-array
awkward-array.org › doc › main › user-guide › how-to-filter-cut-mask.html
How to filter arrays: cutting vs. masking — Awkward Array 2.9.0 documentation
1170 elif any(x.is_record for x in contents): File ~/micromamba/envs/awkward-docs/lib/python3.11/site-packages/awkward/_broadcasting.py:721, in apply_step.<locals>.broadcast_any_list() 717 for i, ((named_axis, ndim), x, x_is_string) in enumerate( 718 zip(named_axes_with_ndims, inputs, input_is_string, strict=False) 719 ): 720 if isinstance(x, listtypes) and not x_is_string: --> 721 next_content = broadcast_to_offsets_avoiding_carry(x, offsets) 722 nextinputs.append(next_content) 723 nextparameters.append(x._parameters) File ~/micromamba/envs/awkward-docs/lib/python3.11/site-packages/awkward/_b
Starred by 214 users
Forked by 38 users
Languages: Python 63.7% | Jupyter Notebook 36.3%
Awkward-array
awkward-array.org › how-to-filter-jagged.html
How to filter lists within arrays using jagged slicing
This is a stub: I intend to write this article, but haven’t yet · If you need it soon, create an issue saying so and I’ll make it a higher priority
GitHub
github.com › scikit-hep › awkward-0.x › issues › 93
Filter function on JaggedArrays · Issue #93 · scikit-hep/awkward-0.x
March 7, 2019 - Numpy and awkward arrays can't overload and, so they overload & instead. Then you have to be careful to put the two sides of the predicates in parentheses because & binds more tightly than you'd like it to. ... You'd have exactly the same problem in pure Numpy, and exactly the same problem in filter, which is why I removed it.
Author: scikit-hep
Awkward-array
awkward-array.org › how-to-filter-num.html
How to filter arrays by number of items
This is a stub: I intend to write this article, but haven’t yet · If you need it soon, create an issue saying so and I’ll make it a higher priority
Readthedocs
awkward-array.readthedocs.io › en › latest › _auto › ak.Array.html
ak.Array — Awkward Array documentation
The key thing is that the nested slice has the same number of elements as the array it’s slicing at every level of nesting that it reproduces. This is similar to the requirement that boolean arrays have the same length as the array they’re filtering.
Awkward-array
awkward-array.org › doc › main › getting-started › community-tutorials.html
Community tutorials — Awkward Array 2.6.3 documentation
An HSF-provided tutorial aimed at High Energy Physics (HEP) researchers on using Awkward Array to obtain a dimuon-mass spectrum. Webpage with example code snippets. Filter ragged arrays using innermost lists.