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
I think it might be useful to have expanded support for NEP 13/18. I was just looking at making a cumulative histogram. Currently, you can do that with:
array: NDArray=np.cumsum(h.values())
# Now you have to make the histogram
And we can even make this shorter:
array: NDArray=np.cumsum(h)
# Still have to make the Histogram, even though you are starting with a Histogram
But this still returns an array. Ideally, I think it should keep the type, that is, return a Histogram. Using NEP 18, this works:
Would this make sense to implement, possibly with arbitrary functions allowed? It would defer to the View, which then would do whatever it supports (also via NEP 13/18), and then produce a new Histogram with axes, etc. carried over, but with the new contents.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I think it might be useful to have expanded support for NEP 13/18. I was just looking at making a cumulative histogram. Currently, you can do that with:
And we can even make this shorter:
But this still returns an array. Ideally, I think it should keep the type, that is, return a Histogram. Using NEP 18, this works:
Would this make sense to implement, possibly with arbitrary functions allowed? It would defer to the View, which then would do whatever it supports (also via NEP 13/18), and then produce a new Histogram with axes, etc. carried over, but with the new contents.
Beta Was this translation helpful? Give feedback.
All reactions