Skip to content
Merged
Prev Previous commit
Next Next commit
fix extension/test_sparse.py
  • Loading branch information
Dr-Irv committed Jan 4, 2020
commit 627251b7c21d10d2cf9a2d3c50f9f8de115ddb77
8 changes: 3 additions & 5 deletions pandas/tests/extension/test_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def test_combine_le(self, data_repeated):
s2 = pd.Series(orig_data2)
result = s1.combine(s2, lambda x1, x2: x1 <= x2)
expected = pd.Series(
pd.arrays.SparseArray(
SparseArray(
[a <= b for (a, b) in zip(list(orig_data1), list(orig_data2))],
fill_value=False,
)
Expand All @@ -242,9 +242,7 @@ def test_combine_le(self, data_repeated):
val = s1.iloc[0]
result = s1.combine(val, lambda x1, x2: x1 <= x2)
expected = pd.Series(
pd.arrays.SparseArray(
[a <= val for a in list(orig_data1)], fill_value=False
)
SparseArray([a <= val for a in list(orig_data1)], fill_value=False)
)
self.assert_series_equal(result, expected)

Expand Down Expand Up @@ -349,7 +347,7 @@ def _compare_other(self, s, data, op_name, other):

with np.errstate(all="ignore"):
expected = pd.Series(
pd.arrays.SparseArray(
SparseArray(
op(np.asarray(data), np.asarray(other)),
fill_value=result.values.fill_value,
)
Expand Down