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

println instead of warn in base/sparse/sparsematrix.jl #5038

Closed
dmbates opened this issue Dec 5, 2013 · 1 comment
Closed

println instead of warn in base/sparse/sparsematrix.jl #5038

dmbates opened this issue Dec 5, 2013 · 1 comment
Labels
status:help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@dmbates
Copy link
Member

dmbates commented Dec 5, 2013

In the findn and findnz methods for SparseMatrixCSC, defined in base/sparse/sparsematrix.jl, warnings are declared as

        else
            println("warning: sparse matrix contains explicit stored zeros")
        end

instead of using warn. Perhaps we could change that.

(I found this out when calling findnz(A) where nnz(A) was close to a million and it happened to include over 6000 values that could be zero for certain parameter values. There is no way to shut off 6000 calls to println.)

@ViralBShah
Copy link
Member

Yes we should use warn.

gitfoxi pushed a commit to gitfoxi/julia that referenced this issue Dec 13, 2013
* upstream/master: (53 commits)
  edit embedding chapter
  formatting fixes
  Fix JuliaLang#5056
  more consitent/useful description of predicate in ie all()
  NEWS for JuliaLang#4042
  Add sparse matvec to perf benchmark (JuliaLang#4707)
  Use warn_once instead of warn (JuliaLang#5038)
  Use warn() instead of println in base/sprase/sparsematrix.jl
  allow scale(b,A) or scale(A,b) when b is a scalar as well as a vector, don't restrict scale unnecessarily to arrays of numbers (e.g. scaling arrays of arrays should work), and improve documentation for scale\!
  Added section about memory management
  added negative bitarray rolling
  More accurate linspace for types with greater precision than Float64
  add realmin realmax for BigFloat
  fix eps(realmax), add typemin and typemax for BigFloat
  fix JuliaLang#5025, ordering used by nextfloat/prevfloat
  roll back on errors during type definitions. fixes JuliaLang#5009
  improve method signature errors. fixes JuliaLang#5018
  update juliadoc
  add more asserts for casts
  Fix segfaulting on strstr() failure
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants