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

added note about laziness of operations to statistical functions #3293

Merged
merged 2 commits into from
Jul 10, 2019

Conversation

corinnebosley
Copy link
Member

Only two functions to clarify here. This is a small one to start us off.

@corinnebosley
Copy link
Member Author

@valeriupredoi @ledm How's this format for you?

@ledm
Copy link

ledm commented Mar 6, 2019

Good one, thanks!

@corinnebosley
Copy link
Member Author

@pp-mo @bjlittle @lbdreyer I've got a whole load of these PRs coming up, if somebody could spare the time to check them over as they come up I'd be really grateful.

@valeriupredoi
Copy link

music to my ears 😁 cheers @corinnebosley 🍺

@@ -31,6 +31,8 @@
def _ones_like(cube):
"""
Return a copy of cube with the same mask, but all data values set to 1.

The operation is non-lazy.
Copy link
Member

@lbdreyer lbdreyer Mar 13, 2019

Choose a reason for hiding this comment

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

I may be missing some context here as to the purpose of this PR, but this line doesn't seem necessary to add.

I'm assuming your intention is to clarify which functions are lazy for the user. If that is the case, it is surely not necessary to add this to a private function, which won't be included in the documentation?

Copy link
Member

Choose a reason for hiding this comment

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

I guess this note would be useful for the next developer who looks at the code, wanting to make the public function lazy?

@bjlittle
Copy link
Member

@corinnebosley Thanks.

@bjlittle bjlittle merged commit 4520590 into SciTools:master Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants