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

Test, document, and export dropzeros[!] #16947

Merged
merged 1 commit into from
Jun 17, 2016

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Jun 15, 2016

In #15242/#14798 and related threads, concensus formed in favor of exporting dropzeros[!] with the shift to retaining stored numerical zeros in SparseMatrixCSCs. This pull request more extensively tests, documents, and exports dropzeros[!]. (@tkelman, other behaviors I should test?) Best!

@tkelman tkelman added the sparse Sparse arrays label Jun 15, 2016
@@ -795,7 +795,24 @@ end
droptol!(A::SparseMatrixCSC, tol, trim::Bool = true) =
fkeep!(A, (i, j, x) -> abs(x) > tol, trim)

"""
dropzeros!(A::SparseMatrixCSC, trim::Bool = true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the signature should also go in the rst somewhere so make docs populates the docstring

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry looks like I should've been more specific. linalg is probably not the best place for these, there is a

.. _stdlib-sparse:

Sparse Vectors and Matrices
---------------------------

section in arrays.rst where these would be a better fit I think

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's must better! Fixed on push. Thanks!

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also droptol! for SparseVector, maybe change SparseMatrixCSC to SparseArray in the signatures`?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch re. SparseVectors! I've updated the pull request with expanded tests and documentation for the SparseVector dropzeros[!] methods.

@kshyatt kshyatt added the docs This change adds or pertains to documentation label Jun 16, 2016
@Sacha0
Copy link
Member Author

Sacha0 commented Jun 16, 2016

AppVeyor timeout unrelated?

@tkelman
Copy link
Contributor

tkelman commented Jun 16, 2016

#16556. LGTM, but will leave open a bit longer for any other comments.

@tkelman tkelman merged commit 1a0a0b7 into JuliaLang:master Jun 17, 2016
@Sacha0 Sacha0 deleted the exportdropzeros branch June 17, 2016 00:20
@Sacha0
Copy link
Member Author

Sacha0 commented Jun 17, 2016

Likewise thanks for the review and merge here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation sparse Sparse arrays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants