-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC fix EX02 algorithms.factorize docstring #51243
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
DOC fix EX02 algorithms.factorize docstring #51243
Conversation
thanks! can you remove them from the excludes list? |
Done. Thanks for the review @MarcoGorelli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these are failing
Error: /home/runner/work/pandas/pandas/pandas/core/base.py:1138:EX02:pandas.Index.factorize:Examples do not pass tests:
**********************************************************************
Line 53, in pandas.Index.factorize
Failed example:
codes
Expected:
array([0, 0, 1, 2, 0], dtype=int64)
Got:
array([0, 0, 1, 2, 0])
**********************************************************************
Line 62, in pandas.Index.factorize
Failed example:
codes
Expected:
array([1, 1, 0, 2, 1], dtype=int64)
Got:
array([1, 1, 0, 2, 1])
**********************************************************************
Line 72, in pandas.Index.factorize
Failed example:
codes
Expected:
array([ 0, -1, 1, 2, 0], dtype=int64)
Got:
array([ 0, -1, 1, 2, 0])
**********************************************************************
Line 83, in pandas.Index.factorize
Failed example:
codes
Expected:
array([0, 0, 1], dtype=int64)
Got:
array([0, 0, 1])
**********************************************************************
Line 97, in pandas.Index.factorize
Failed example:
codes
Expected:
array([0, 0, 1], dtype=int64)
Got:
array([0, 0, 1])
**********************************************************************
Line 107, in pandas.Index.factorize
Failed example:
codes
Expected:
array([ 0, 1, 0, -1], dtype=int64)
Got:
array([ 0, 1, 0, -1])
**********************************************************************
Line 113, in pandas.Index.factorize
Failed example:
codes
Expected:
array([0, 1, 0, 2], dtype=int64)
Got:
array([0, 1, 0, 2])
Error: /home/runner/work/pandas/pandas/pandas/core/base.py:1138:EX02:pandas.Series.factorize:Examples do not pass tests:
**********************************************************************
Line 53, in pandas.Series.factorize
Failed example:
codes
Expected:
array([0, 0, 1, 2, 0], dtype=int64)
Got:
array([0, 0, 1, 2, 0])
**********************************************************************
Line 62, in pandas.Series.factorize
Failed example:
codes
Expected:
array([1, 1, 0, 2, 1], dtype=int64)
Got:
array([1, 1, 0, 2, 1])
**********************************************************************
Line 72, in pandas.Series.factorize
Failed example:
codes
Expected:
array([ 0, -1, 1, 2, 0], dtype=int64)
Got:
array([ 0, -1, 1, 2, 0])
**********************************************************************
Line 83, in pandas.Series.factorize
Failed example:
codes
Expected:
array([0, 0, 1], dtype=int64)
Got:
array([0, 0, 1])
**********************************************************************
Line 97, in pandas.Series.factorize
Failed example:
codes
Expected:
array([0, 0, 1], dtype=int64)
Got:
array([0, 0, 1])
**********************************************************************
Line 107, in pandas.Series.factorize
Failed example:
codes
Expected:
array([ 0, 1, 0, -1], dtype=int64)
Got:
array([ 0, 1, 0, -1])
**********************************************************************
Line 113, in pandas.Series.factorize
Failed example:
codes
Expected:
array([0, 1, 0, 2], dtype=int64)
Got:
array([0, 1, 0, 2])
Error: /home/runner/work/pandas/pandas/pandas/core/algorithms.py:612:EX02:pandas.factorize:Examples do not pass tests:
**********************************************************************
Line 58, in pandas.factorize
Failed example:
codes
Expected:
array([0, 0, 1, 2, 0], dtype=int64)
Got:
array([0, 0, 1, 2, 0])
**********************************************************************
Line 67, in pandas.factorize
Failed example:
codes
Expected:
array([1, 1, 0, 2, 1], dtype=int64)
Got:
array([1, 1, 0, 2, 1])
**********************************************************************
Line 77, in pandas.factorize
Failed example:
codes
Expected:
array([ 0, -1, 1, 2, 0], dtype=int64)
Got:
array([ 0, -1, 1, 2, 0])
**********************************************************************
Line 88, in pandas.factorize
Failed example:
codes
Expected:
array([0, 0, 1], dtype=int64)
Got:
array([0, 0, 1])
**********************************************************************
Line 102, in pandas.factorize
Failed example:
codes
Expected:
array([0, 0, 1], dtype=int64)
Got:
array([0, 0, 1])
**********************************************************************
Line 112, in pandas.factorize
Failed example:
codes
Expected:
array([ 0, 1, 0, -1], dtype=int64)
Got:
array([ 0, 1, 0, -1])
**********************************************************************
Line 118, in pandas.factorize
Failed example:
codes
Expected:
array([0, 1, 0, 2], dtype=int64)
Got:
array([0, 1, 0, 2])
Partially validate docstrings (EX02) DONE
…fix_ex02_docstrings_factorize
The Docstring validation should be good now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup - thanks @albuzenet !
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Towards #51236.
Fix EX02 docstring errors for :
pandas.factorize
pandas.Index.factorize
pandas.Series.factorize