-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BlockerBlocking issue or pull request for an upcoming releaseBlocking issue or pull request for an upcoming releaseCIContinuous IntegrationContinuous IntegrationDependenciesRequired and optional dependenciesRequired and optional dependencies
Milestone
Description
I can reproduce with numpy master
==================================== ERRORS ====================================
__________ ERROR collecting pandas/tests/arrays/sparse/test_array.py ___________
pandas/tests/arrays/sparse/test_array.py:22: in <module>
class TestSparseArray:
pandas/tests/arrays/sparse/test_array.py:511: in TestSparseArray
dtype=SparseDtype("datetime64[ns]", pd.Timestamp("1970")),
pandas/core/arrays/sparse/array.py:364: in __init__
data, kind=kind, fill_value=fill_value, dtype=dtype
pandas/core/arrays/sparse/array.py:1584: in make_sparse
sparsified_values = arr[mask]
E IndexError: arrays used as indices must be of integer (or boolean) type
--------- generated xml file: /home/vsts/work/1/s/test-data-single.xml ---------
========================== slowest 10 test durations ===========================
(Pdb) pp arr
array(['1970-01-01T00:00:00.000000000', '1970-01-01T00:00:00.000000001'],
dtype='datetime64[ns]')
(Pdb) pp fill_value
Timestamp('1970-01-01 00:00:00')
(Pdb) pp arr != fill_value
array([True, True], dtype=object)
Previously, that was bool dtype
In [6]: np.array(['1970-01-01T00:00:00.000000000', '1970-01-01T00:00:00.000000001'],
...: dtype='datetime64[ns]') == pd.Timestamp('1970-01-01 00:00:00')
Out[6]: array([False, False])
Metadata
Metadata
Assignees
Labels
BlockerBlocking issue or pull request for an upcoming releaseBlocking issue or pull request for an upcoming releaseCIContinuous IntegrationContinuous IntegrationDependenciesRequired and optional dependenciesRequired and optional dependencies