question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

*::flatten and *::count for axis != 0

See original GitHub issue

All array types, including IndexedArray (and UnionArray, if it exists when you’re ready for it).

Discussion of how to interpret negative axis here.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jpivarskicommented, Jan 15, 2020

@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 (flatten and count being the first two) and the new array types, Python front-end, and Numba implementation to me. That’s completely negotiable.

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 axis should be interpreted, so it would be good to read ahead about what’s coming.

0reactions
iannacommented, Jan 15, 2020

Oh, good! With your work on NumpyArray, however, I put in some corrections to your initial implementation (PR #45) as part of adding IndexedArray::flatten yesterday (PR #81). Specifically, this:

https://github.com/scikit-hep/awkward-1.0/blob/428c3db9745af34798f3f970ffa48e2db009485b/src/libawkward/array/NumpyArray.cpp#L628-L634

It’s a potential merging hazard!

No problem, I’ll start with a clean area.

Read more comments on GitHub >

github_iconTop Results From Across the Web

what does axes.flat in matplotlib do? - Stack Overflow
An alternative would be to use axes.flatten() , where flatten() is method of the numpy array. Instead of an iterator, it returns a...
Read more >
Flatten a NumPy array with ravel() and flatten() - nkmk note
You can flatten a NumPy array ndarray with the numpy.label() function, or the ravel() and flatten() methods of numpy.ndarray .
Read more >
ak.flatten — Awkward Array documentation - Read the Docs
Returns an array with one level of nesting removed by erasing the boundaries between consecutive lists. Since this operates on a level of...
Read more >
How to flatten a hierarchical index in Pandas DataFrame ...
In such cases, the hierarchical index has to be flattened at both levels. Syntax: pandas.DataFrame.groupby(by=None, axis=0, level=None).
Read more >
ak.flatten — Awkward Array 2.0.1 documentation
Returns an array with one level of nesting removed by erasing the boundaries between consecutive lists. Since this operates on a level of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found