-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fixed documentation for few files #40903
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
Conversation
ShaharNaveh
commented
Apr 12, 2021
•
edited
Loading
edited
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
pandas/core/indexers.py
Outdated
... | ||
ValueError: negative dimensions are not allowed | ||
|
||
>>> validate_indices(np.ndarray([0, 1]), 0) # OK |
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.
The docs in master ATM says it should raise an IndexError
, but it does not.
Would be glad if someone will take a look here
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.
Why are you using np.ndarray instead of np.array? The latter one raises
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.
Why are you using np.ndarray instead of np.array? The latter one raises
I complety missed it, I have pushed a fix for it in 857c110
dont' we have a master issue for this? (e.g. getting all doc-tests running)? cc @MarcoGorelli |
I wasn't aware that not all doctests were running - anyway, there's #22459 still open |
ci/code_checks.sh
Outdated
@@ -138,6 +138,10 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then | |||
|
|||
# Individual files | |||
|
|||
MSG='Doctests algorithms.py' ; echo $MSG |
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.
can these be combined? e.g. 1 for files, 1 for directories
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.
Sure, will open a separate PR for that.
... pd.Timestamp("20160101", tz="US/Eastern"), | ||
... ] | ||
... ) | ||
... ) | ||
DatetimeIndex(['2016-01-01 00:00:00-05:00'], |
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.
Format here looks a bit odd?
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.
That's the "Black" formatting.
I personally think it's easier on the eyes, but that's not a deal breaker for me.
Can revert if you think it's best to leave it as it was before
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.
Sorry if this was misleading, I was referring to the lines you haven‘t touched, they look out of sync 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.
I didn't managed to get the output lines to follow the "black" formatting styles.
What I could do is to make the output to appear in a single line, instead of multiple by using \
. i.e
def foo():
"""
Examples
--------------
>> foo()
Line1 \
Line 2 \
Line 3 \
"""
Will result in the docs as:
>>> foo()
Line 1 Line 2 Line 3
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.
Sounds good to me
small comment, otherwise lgtm |
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 good, ex @phofl comment, ping on green
lgtm @phofl over to you |
thanks @ShaharNaveh |
Co-authored-by: ShaharNaveh <>
Co-authored-by: ShaharNaveh <>