Skip to content

Conversation

@Sbte
Copy link
Contributor

@Sbte Sbte commented Mar 14, 2024

I ran into this while trying to pass the where argument to numpy.mean().

@Sbte Sbte requested a review from a team as a code owner March 14, 2024 09:03
@LourensVeen
Copy link
Member

Looks fine to me. It does extend the AMUSE API to match all of the numpy API (and it means we'll evolve with numpy if they change) but we're doing that already for median(), so I'd say that's alright.

Is there any particular usage you have that you want to add a test for?

@Sbte
Copy link
Contributor Author

Sbte commented Mar 19, 2024

Thanks for the review Lourens. I added a test. I'm not sure why the tests are numbered instead of using meaningful names like test_mean, but I followed the same pattern.

rieder
rieder previously approved these changes Mar 19, 2024
Copy link
Member

@rieder rieder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!
Only comment I have is that it's best to give tests a more descriptive name, the numbered tests is a relic from when we used nosetests instead of pytest.

@Sbte
Copy link
Contributor Author

Sbte commented Mar 19, 2024

Ah, perfect. I changed the name.

@rieder rieder merged commit 09117ad into amusecode:main Mar 20, 2024
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.

3 participants