Skip to content

BUG: Consistent division by zero behavior for Index/Series #27321

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

Merged
merged 29 commits into from
Jul 11, 2019
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6bd4fb1
TST: parametrize tests
jbrockmendel Jul 7, 2019
d9943be
for loop, preparing to parametrize
jbrockmendel Jul 7, 2019
eb8b6d7
parametrize/fixturize mix
jbrockmendel Jul 7, 2019
3edebac
fixture for op
jbrockmendel Jul 7, 2019
eb60fc3
blackify
jbrockmendel Jul 7, 2019
3cf8b1e
parametrize more
jbrockmendel Jul 7, 2019
c34a9cc
param scalar
jbrockmendel Jul 7, 2019
158b003
Merge branch 'master' of https://github.com/pandas-dev/pandas into sp…
jbrockmendel Jul 7, 2019
b59b81a
docstring, xfail
jbrockmendel Jul 7, 2019
f085d6b
remove defunct comment
jbrockmendel Jul 7, 2019
339ed84
Merge branch 'master' of https://github.com/pandas-dev/pandas into sp…
jbrockmendel Jul 8, 2019
f03bd93
implement all_arithmetic_functions fixture
jbrockmendel Jul 8, 2019
cd2f564
isort fixup
jbrockmendel Jul 9, 2019
e362a08
check early for non-scalar default_fill_value
jbrockmendel Jul 9, 2019
7c6e127
try to bring dispatch_fill_zeros, dispatch_mnissing in sync, remove u…
jbrockmendel Jul 8, 2019
97611c3
standardize calls
jbrockmendel Jul 8, 2019
c30b40c
use pandas convention for divmod
jbrockmendel Jul 9, 2019
1ed12b8
remove comment
jbrockmendel Jul 9, 2019
45ffbc2
Merge branch 'master' of https://github.com/pandas-dev/pandas into di…
jbrockmendel Jul 10, 2019
591eaaa
patch sparse and IntegerArray tests
jbrockmendel Jul 10, 2019
2841be0
Merge branch 'master' of https://github.com/pandas-dev/pandas into di…
jbrockmendel Jul 10, 2019
518e2e9
Merge branch 'master' of https://github.com/pandas-dev/pandas into di…
jbrockmendel Jul 10, 2019
2580048
fixup for docs
jbrockmendel Jul 10, 2019
f440c59
Merge branch 'master' of https://github.com/pandas-dev/pandas into di…
jbrockmendel Jul 10, 2019
188ac99
Merge branch 'master' of https://github.com/pandas-dev/pandas into di…
jbrockmendel Jul 11, 2019
6b411c4
requested comments
jbrockmendel Jul 11, 2019
77c2383
whatsnew
jbrockmendel Jul 11, 2019
7b8880c
Merge branch 'master' of https://github.com/pandas-dev/pandas into di…
jbrockmendel Jul 11, 2019
14010c8
dummy commit to force ci
jbrockmendel Jul 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
blackify
  • Loading branch information
jbrockmendel committed Jul 7, 2019
commit eb60fc36c7229b09982a540ef48a9faba86990f5
29 changes: 19 additions & 10 deletions pandas/tests/arrays/sparse/test_arithmetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,24 @@ def mix(request):
return request.param


@pytest.fixture(params=[
operator.add, ops.radd,
operator.sub, ops.rsub,
operator.mul, ops.rmul,
operator.truediv, ops.rtruediv,
operator.floordiv, ops.rfloordiv,
operator.mod, ops.rmod,
operator.pow, ops.rpow
])
@pytest.fixture(
params=[
operator.add,
ops.radd,
operator.sub,
ops.rsub,
operator.mul,
ops.rmul,
operator.truediv,
ops.rtruediv,
operator.floordiv,
ops.rfloordiv,
operator.mod,
ops.rmod,
operator.pow,
ops.rpow,
]
)
def op(request):
return request.param

Expand All @@ -50,7 +59,7 @@ def _check_numeric_ops(self, a, b, a_dense, b_dense, mix, op):

if op in [operator.floordiv, ops.rfloordiv]:
# FIXME: GH#13843
if (self._base == pd.Series and a.dtype.subtype == np.dtype("int64")):
if self._base == pd.Series and a.dtype.subtype == np.dtype("int64"):
return # TODO: pytest.skip? xfail?

if mix:
Expand Down