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

make similar for sparse vectors more consistent and comprehensive #24260

Merged
merged 1 commit into from
Oct 24, 2017

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Oct 21, 2017

This pull request makes similar for SparseVectors more consistent and comprehensive. Sequel to #17507. Best!

@Sacha0 Sacha0 added bugfix This change fixes an existing bug sparse Sparse arrays labels Oct 21, 2017
@Sacha0
Copy link
Member Author

Sacha0 commented Oct 22, 2017

Absent objections or requests for time, I plan to merge these changes tomorrow. Best!

@andreasnoack
Copy link
Member

Could you have an example of the old and new behavior here?

@Sacha0
Copy link
Member Author

Sacha0 commented Oct 22, 2017

Could you have an example of the old and new behavior here?

With this pull request, similar for SparseVectors now: (1) supports every mode of invocation supported by the AbstractArray similar interface; (2) supports all relevant such modes of invocation also when accepting an index-type specification; (3) preserves storage space in similar(A::SparseVector[, Tv, Ti], shape::Dims{2}); and (4) falls back to AbstractArray similar when the requested shape is not one- or two-dimensional. Does that description suffice? :)

(Edit: The preceding matches SparseMatrixCSC's behavior.)

@Sacha0
Copy link
Member Author

Sacha0 commented Oct 23, 2017

Absent objections or requests for time, I plan to merge these changes this evening or later. Best!

@fredrikekre fredrikekre merged commit bbcace2 into JuliaLang:master Oct 24, 2017
@Sacha0 Sacha0 deleted the similarspvec branch October 24, 2017 15:46
@Sacha0
Copy link
Member Author

Sacha0 commented Oct 24, 2017

Thanks all! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug sparse Sparse arrays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants