Skip to content

Commit

Permalink
TST: Fix wrong array comparison in the make_sparse bug-fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Licht-T committed Sep 22, 2017
1 parent c9d674a commit 7727c5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pandas/tests/sparse/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def test_constructor_object_dtype(self):
arr = SparseArray(data, dtype=np.object, fill_value=False)
assert arr.dtype == np.object
assert arr.fill_value is False
assert (arr == np.array(data, dtype=np.object)).to_dense().all()
arr_expected = np.array(data, dtype=np.object)
it = (type(x) == type(y) and x == y for x, y in zip(arr, arr_expected))
assert np.fromiter(it, dtype=np.bool).all()

def test_constructor_spindex_dtype(self):
arr = SparseArray(data=[1, 2], sparse_index=IntIndex(4, [1, 2]))
Expand Down

0 comments on commit 7727c5a

Please sign in to comment.