DOC: `scipy.stats.skew` no longer returns 0 on constant input
See original GitHub issueDescribe your issue.
The documentation of scipy.stats.skew
states
Returns: skewness ndarray The skewness of values along an axis, returning 0 where all values are equal.
However, while this used to be the case for scipy < 1.9, it is no longer the case for scipy 1.9.
Reproducing Code Example
In [1]: import scipy
In [2]: scipy.stats.skew([0, 0])
Error message
Out[2]: nan
Expected Outcome
Out[2]: 0.0
SciPy/NumPy/Python version information
1.9.0 1.23.1 sys.version_info(major=3, minor=8, micro=5, releaselevel=‘final’, serial=0)
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
scipy.stats.skew — SciPy v1.9.3 Manual
For unimodal continuous distributions, a skewness value greater than zero means that there is more weight in the right tail of the distribution....
Read more >scipy.stats.skew doesn't work correctly for float point numbers
Compute the sample skewness of a data set. For normally distributed data, the skewness should be about 0. For. unimodal continuous ...
Read more >SciPy 1.7.0 Release Notes
Before upgrading, we recommend that users check that their own code does not use deprecated SciPy functionality (to do so, run your code...
Read more >scipy.stats.stats — Elephant 0.7.0 documentation
Use masked arrays to ignore any non-finite values in the input or that arise in the ... If there is more than one...
Read more >scipy stats.skew() | Python
skewness < 0 : more weight in the right tail of the distribution. Its formula –. Parameters : array : Input array or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We usually don’t update the changelog during PR development but when we do create a release (we keep a wiki page for that but for backporting there are only a few items to look at so not needed and we address manually).
Just checking, this means that this change will not be featured in the changelog?