Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see the list of methods in a Julia Package

Tags:

julia

Is there a command in Julia that lists all the methods that are available in a package?

For example I load up Distributions

using Distributions

and now I would like to see what function to call to draw a random value from a normal distribution. Is there a good way to do this from inside of Julia without a google search?

like image 823
Rob Donnelly Avatar asked Feb 22 '15 18:02

Rob Donnelly


1 Answers

Sort of, although I don't think its of much utility:

julia> using Distributions

julia> names(Distributions)
215-element Array{Symbol,1}:
 :median
 :logpdf
 :logpmf!
 :Chisq
 :posterior_rand
 :fit_mle!
 :NegativeBinomial
 :posterior_rand!
 :ContinuousMatrixDistribution
 :ValueSupport
 :InverseGamma
 :complete
 :TDist
 :NormalCanon
 :SufficientStats
 :Chi
 :logpmf
 :logdetcov
 :Gumbel
 :Sampleable
 ...

or non-programmatically, using

julia> whos(Distributions)
AbstractMixtureModel          DataType
AbstractMvNormal              DataType
Arcsine                       DataType
Bernoulli                     DataType
Beta                          DataType
BetaPrime                     DataType
Binomial                      DataType

I think that with the inclusion of an inbuilt documentation system in Julia 0.4, we'll get way more packages with docs available at the REPL.

like image 99
IainDunning Avatar answered Sep 29 '22 06:09

IainDunning