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
ENH: (NEP 18) implement and test cumulative functions #338
ENH: (NEP 18) implement and test cumulative functions #338
Conversation
I think it would be more useful to raise an error. It looks like astropy does this generically for the
|
although looking at the traceback it seems they do have a cumprod wrapper, it just always (?) raises an error. |
It seems that it does error 100% of the time yes, including for scalar arrays (to which |
I'm not sure which existing exception I should raise however, which makes me wonder wether it'd be a good idea to have a generic I'll do that here while I wait for your feedback, but I'll leave the class hierarchy alone for now. |
… with a unyt array
@ngoldbaum any idea when you might be able to re-iterate on this one ? I usually wait for the current NEP 18 PR to go through before I start working on another one but I could adapt my strategy if appropriate. So I absolutely don't mean to pressure you, just let me know if you can. |
Hi sorry for taking so long to look at this. I took last week off from coding and have been focusing on other stuff at work. I'm not really a fan of We probably need to more carefully look at how exceptions work in unyt in general since right now the situation is kind of a hodgepodge, although that might need a deprecation cycle since we'd be doing an API break. For now I'm just going to merge this, but I'd like to have a discussion about how to handle exceptions, whether we need to do some sort of deprecation cycle, and how we can make it simpler to deal with exceptions raised by unyt before we do the final release. |
Thanks. I agree it'd be good to discuss exceptions in more details. I opened an issue from your comment so it doesn't get lost. I'll give it some thoughts tomorrow on a rested mind. |
cumprod
is a bit tricky, I don't think there's a right way to handle it, so I'm just adding a warning to raise awareness