You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pd.Index.get_loc returns a Mask if the Index is not unique
import sparsity as sp
import numpy as np
sf = sp.SparseFrame(np.zeros((5,3)), columns=['A', 'A', 'B'])
sf['B'].toarray()
array([ 0., 0., 0., 0., 0.])
sf['A'].toarray()
Traceback (most recent call last):
File "/Users/kayibal/virtualenvs/traildb-sparse/lib/python3.5/site-packages/scipy/sparse/csr.py", line 244, in asindices
x = x.astype(idx_dtype)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'slice'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Users/kayibal/Code/traildb_to_sparse/traildb_to_sparse/traildb_to_sparse/sparsity/sparse_frame.py", line 455, in __getitem__
return SparseFrame(self.data[:,idx], index=self.index,
File "/Users/kayibal/virtualenvs/traildb-sparse/lib/python3.5/site-packages/scipy/sparse/csr.py", line 336, in __getitem__
col = asindices(col)
File "/Users/kayibal/virtualenvs/traildb-sparse/lib/python3.5/site-packages/scipy/sparse/csr.py", line 246, in asindices
raise IndexError('invalid index')
IndexError: invalid index
The text was updated successfully, but these errors were encountered:
pd.Index.get_loc returns a Mask if the Index is not unique
The text was updated successfully, but these errors were encountered: