You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Like the NumPy functions of the same name, these operations return an integer array of the positions of the minimum and maximum values per subarray. (By the way, this is technically not a reducer in the sense of issue #69 and it would have an independent implementation.)
These jagged integer arrays could then be used as slices, so it was a useful deviation from NumPy.
However, deviating at all from NumPy is bad, especially if the function has the same name and mostly the same meaning. Instead of what was done in the old Awkward, the above should return
For regular arrays, this behavior would be identical to NumPy's; for irregular ones, users are introduced to OptionType arrays (most likely IndexedOptionArray, which has already been implemented, but possibly ByteMaskedArray or BitMaskedArray).
I'll be allowing these arrays as slices in #67 (following the behavior established by pyarrow), so they'll also be useful.
@nsmith- might want to comment on this change in behavior.
The text was updated successfully, but these errors were encountered:
Also relevant: the new ak.singletons function in #198. This is needed to turn the ak.argmax output into something that can select one object from each list.
Maybe there will also need to be a convenient syntax for it, since the examples in the tutorial are looking like:
# select <- to singletons <- argmax <- the cutevents.pions[ak.singletons(ak.argmax(abs(events.pions.vtx), axis=1))]
Like the NumPy functions of the same name, these operations return an integer array of the positions of the minimum and maximum values per subarray. (By the way, this is technically not a reducer in the sense of issue #69 and it would have an independent implementation.)
The old Awkward Array had a different return type for this function:
in order to handle cases without a minimum or maximum, which are possible because of the existence of jagged arrays.
These jagged integer arrays could then be used as slices, so it was a useful deviation from NumPy.
However, deviating at all from NumPy is bad, especially if the function has the same name and mostly the same meaning. Instead of what was done in the old Awkward, the above should return
For regular arrays, this behavior would be identical to NumPy's; for irregular ones, users are introduced to OptionType arrays (most likely IndexedOptionArray, which has already been implemented, but possibly ByteMaskedArray or BitMaskedArray).
I'll be allowing these arrays as slices in #67 (following the behavior established by
pyarrow
), so they'll also be useful.@nsmith- might want to comment on this change in behavior.
The text was updated successfully, but these errors were encountered: