-
Notifications
You must be signed in to change notification settings - Fork 21
Add a correction
keyword to the std
methods
#183
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
Changes from 1 commit
802a45d
1e2d7b8
a258400
b77d702
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -410,20 +410,36 @@ def mean(self, *, skip_nulls: bool = True) -> DType: | |
dtypes. | ||
""" | ||
|
||
def std(self, *, skip_nulls: bool = True) -> DType: | ||
def std(self, *, correction: int | float = 1, skip_nulls: bool = True) -> DType: | ||
""" | ||
Reduction returns a scalar. Must be supported for numerical and | ||
datetime data types. Returns a float for numerical data types, and | ||
datetime (with the appropriate timedelta format string) for datetime | ||
dtypes. | ||
|
||
Parameters | ||
---------- | ||
correction | ||
Correction to apply to the result. 0 for sample standard deviation | ||
and 1 for population standard deviation. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we're only supporting 0 or 1 can this just be an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the description is misleading here. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we "borrow" the docstring from the Array API specification then? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fine with me, but up to Marco. :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've reworded to make clear that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That rewording was for only 1 of 4 docstrings. I now edited all of them, and for one adopted the more extensive description from the array API standard. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MarcoGorelli if you're happy with that change, I think this PR is good to go.
MarcoGorelli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
skip_nulls | ||
Whether to skip null values. | ||
""" | ||
|
||
def var(self, *, skip_nulls: bool = True) -> DType: | ||
def var(self, *, correction: int | float = 1, skip_nulls: bool = True) -> DType: | ||
""" | ||
Reduction returns a scalar. Must be supported for numerical and | ||
datetime data types. Returns a float for numerical data types, and | ||
datetime (with the appropriate timedelta format string) for datetime | ||
dtypes. | ||
|
||
Parameters | ||
---------- | ||
correction | ||
Correction to apply to the result. 0 for sample standard deviation | ||
and 1 for population standard deviation. | ||
skip_nulls | ||
Whether to skip null values. | ||
""" | ||
|
||
def is_null(self) -> Column: | ||
|
Uh oh!
There was an error while loading. Please reload this page.