Skip to content
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: harmonize rules for how NEP 18 functions handle an *out* argument #295

Merged
merged 1 commit into from Oct 14, 2022

Conversation

neutrinoceros
Copy link
Member

follow up to #293
Apply rules established in #200:

  • the out argument is only valid if it's a unyt_array with an appropriate unit (convertible to the expected return unit)
  • if its unit doesn't match the "natural" one (say if we concatenate two arrays with units "cm", but we out to a third array with units "km"), convert it in place

@neutrinoceros neutrinoceros marked this pull request as ready for review October 13, 2022 19:22
@ngoldbaum ngoldbaum merged commit c34c211 into yt-project:main Oct 14, 2022
@neutrinoceros neutrinoceros deleted the nep18_harmonize_out branch October 14, 2022 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants