Skip to content

Commit da3f062

Browse files
committed
Clean up imports
All imports now from top level Also use Distributions.Chi, which now exists, as opposed to taking square roots of random variates from Chisq. Closes #21
1 parent ff98613 commit da3f062

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/GaussianEnsembles.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@
1313
# Alan Edelman, Per-Olof Persson and Brian D Sutton, "The fourfold way"
1414
# http://www-math.mit.edu/~edelman/homepage/papers/ffw.pdf
1515

16-
import Distributions: Chisq
17-
import Base: isinf, rand
1816
export GaussianHermite, GaussianLaguerre, GaussianJacobi,
1917
Wigner, Wishart, MANOVA #Synonyms for Hermite, Laguerre and Jacobi
2018

2119
#A convenience function to define a chi scalar random variable
22-
χ(df::Real) = (rand(Chisq(df)))
20+
χ(df::Real) = rand(Chi(df))
2321

2422
#####################
2523
# Hermite ensemble #

src/RandomMatrices.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ module RandomMatrices
22
import Distributions
33
using Combinatorics,Compat
44

5-
import Distributions: ContinuousMatrixDistribution
5+
import Distributions: ContinuousMatrixDistribution, Chi
66

7-
import Base.rand
87

98
#If the GNU Scientific Library is present, turn on additional functionality.
109
_HAVE_GSL = try
@@ -14,6 +13,8 @@ catch
1413
false
1514
end
1615

16+
import Base: isinf, rand
17+
1718
export bidrand, #Generate random bidiagonal matrix
1819
tridrand, #Generate random tridiagonal matrix
1920
sprand, #Generate random sparse matrix

0 commit comments

Comments
 (0)