SparseArrays.jl icon indicating copy to clipboard operation
SparseArrays.jl copied to clipboard

document rfn argument of sprand

Open stevengj opened this issue 2 years ago • 2 comments

I noticed that the rfn argument of sprand was poorly documented:

  1. We didn't say what its arguments should be.
  2. We didn't say clearly that it defaults to rand
  3. The type T argument goes in a different place if rfn is passed. Moreover, although in this case you can pass T as the last argument, it seems that it doesn't really work — if it doesn't match the return type of rfn, it is ignored! So, it seems better to leave that undocumented for now until we decide what to do with it.

stevengj avatar Dec 02 '22 00:12 stevengj

See also https://github.com/JuliaLang/julia/pull/30637

stevengj avatar Dec 02 '22 01:12 stevengj

Codecov Report

Merging #309 (f0d6f78) into main (5f164a0) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #309   +/-   ##
=======================================
  Coverage   93.61%   93.61%           
=======================================
  Files          12       12           
  Lines        7380     7380           
=======================================
  Hits         6909     6909           
  Misses        471      471           
Impacted Files Coverage Δ
src/sparsematrix.jl 95.37% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Dec 02 '22 01:12 codecov-commenter