Skip to content
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

Columns access fails on empty sparse frame #76

Closed
kayibal opened this issue Jun 3, 2019 · 3 comments · Fixed by #83
Closed

Columns access fails on empty sparse frame #76

kayibal opened this issue Jun 3, 2019 · 3 comments · Fixed by #83
Labels

Comments

@kayibal
Copy link

kayibal commented Jun 3, 2019

Accessing a column on an empty sparse frame results in an error:

|CONTAINER| File "/home/drtools/.build/sparsity-0.20.0/sparsity/sparse_frame.py", line 804, in __getitem__
|CONTAINER| return self.reindex_axis(item, axis=1)
|CONTAINER| File "/home/drtools/.build/sparsity-0.20.0/sparsity/sparse_frame.py", line 1011, in reindex_axis
|CONTAINER| new_data = self._data.T[idx].T[:-1]
|CONTAINER| File "/opt/conda/lib/python3.6/site-packages/scipy/sparse/csr.py", line 304, in __getitem__
|CONTAINER| return self._get_submatrix(row, col)
|CONTAINER| File "/opt/conda/lib/python3.6/site-packages/scipy/sparse/csr.py", line 447, in _get_submatrix
|CONTAINER| check_bounds(i0, i1, M)
|CONTAINER| File "/opt/conda/lib/python3.6/site-packages/scipy/sparse/csr.py", line 443, in check_bounds
|CONTAINER| " %d <= %d" % (i0, num, i1, num, i0, i1))
|CONTAINER| IndexError: index out of bounds: 0 <= 0 <= 0, 0 <= -1 <= 0, 0 <= -1
@michcio1234 michcio1234 added the bug label Jul 4, 2019
@michcio1234
Copy link

So far I can't reproduce it.

@michcio1234
Copy link

I tried with clean environment installed exactly as requirements suggest and it still works.

michcio1234 added a commit that referenced this issue Jul 12, 2019
Turns out the bug #76 was already fixed in commit
e8fa03f
@michcio1234
Copy link

Turns out the bug was already fixed in commit e8fa03f.

michcio1234 added a commit that referenced this issue Jul 12, 2019
Turns out the bug #76 was already fixed in commit
e8fa03f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants