Skip to content

Conversation

@goggle
Copy link
Contributor

@goggle goggle commented Sep 11, 2019

This PR intends to fix #30981.

I'm not sure if using these nested function definitions _rowcol is the right way to do it. If not, let me know what I should do instead.

@stevengj stevengj added the sparse Sparse arrays label Sep 12, 2019
@goggle
Copy link
Contributor Author

goggle commented Sep 12, 2019

@stevengj The tests seem to fail because of the most recent change. I've scrolled through it and saw that it has something to do with ambiguities... Do you know how to resolve this? I will look at it as soon as I have some time...

@stevengj
Copy link
Member

It looks like the ambiguity will be fixed if you just define:

Base._ind2sub(t::AbstractArray, ind::CartesianIndex) = Tuple(ind)

instead of Base._ind2sub(t, ind::CartesianIndex)

@goggle
Copy link
Contributor Author

goggle commented Sep 13, 2019

Thank you @stevengj, I've finally changed it to

Base._ind2sub(t::Tuple, ind::CartesianIndex) = Tuple(ind)

It seems to pass the test now (I think the failed test for package_win64 is not related). Let me know, if you still approve the commit.

@stevengj
Copy link
Member

LGTM.

@timholy timholy merged commit 77fa781 into JuliaLang:master Sep 14, 2019
@timholy
Copy link
Member

timholy commented Sep 14, 2019

Thanks, @goggle!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sparse Sparse arrays

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SparseMatrixCSC does not support indexing by arrays of CartesianIndex

3 participants