Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed May 25, 2018
1 parent 6303cd8 commit f6d5386
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def all_arithmetic_operators(request):
def all_compare_operators(request):
"""
Fixture for dunder names for common compare operations
"""
"""
return request.param


Expand Down
1 change: 1 addition & 0 deletions pandas/core/arrays/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ def _add_numeric_methods_binary(cls):
cls.__rdiv__ = cls._make_arithmetic_op(ops.rdiv)

cls.__divmod__ = cls._make_arithmetic_op(divmod)
cls.__rdivmod__ = cls._make_arithmetic_op(ops.rdivmod)

@classmethod
def make_comparison_op(cls, op):
Expand Down
15 changes: 14 additions & 1 deletion pandas/core/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,20 @@ def na_op(x, y):
return result

def safe_na_op(lvalues, rvalues):
# all others
"""
return the result of evaluating na_op on the passed in values
try coercion to object type if the native types are not compatible
Parameters
----------
lvalues : array-like
rvalues : array-like
Raises
------
invalid operation raises TypeError
"""
try:
with np.errstate(all='ignore'):
return na_op(lvalues, rvalues)
Expand Down

0 comments on commit f6d5386

Please sign in to comment.