Skip to content

Commit f6d5386

Browse files
committed
review comments
1 parent 6303cd8 commit f6d5386

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

pandas/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def all_arithmetic_operators(request):
101101
def all_compare_operators(request):
102102
"""
103103
Fixture for dunder names for common compare operations
104-
"""
104+
"""
105105
return request.param
106106

107107

pandas/core/arrays/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ def _add_numeric_methods_binary(cls):
690690
cls.__rdiv__ = cls._make_arithmetic_op(ops.rdiv)
691691

692692
cls.__divmod__ = cls._make_arithmetic_op(divmod)
693+
cls.__rdivmod__ = cls._make_arithmetic_op(ops.rdivmod)
693694

694695
@classmethod
695696
def make_comparison_op(cls, op):

pandas/core/ops.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,20 @@ def na_op(x, y):
10351035
return result
10361036

10371037
def safe_na_op(lvalues, rvalues):
1038-
# all others
1038+
"""
1039+
return the result of evaluating na_op on the passed in values
1040+
1041+
try coercion to object type if the native types are not compatible
1042+
1043+
Parameters
1044+
----------
1045+
lvalues : array-like
1046+
rvalues : array-like
1047+
1048+
Raises
1049+
------
1050+
invalid operation raises TypeError
1051+
"""
10391052
try:
10401053
with np.errstate(all='ignore'):
10411054
return na_op(lvalues, rvalues)

0 commit comments

Comments
 (0)