Find packages by function names

Similarly you can also load the package you are using and ask it where it got something from.

Referring to it by qualified name of the scope where you find it.

Say I say isposdef being used in the source code of Distributions.jl and i wanted to know where it came from:

julia> using Distributions

julia> @which Distributions.isposdef
LinearAlgebra


julia> methods(Distributions.isposdef)
# 7 methods for generic function "isposdef":
[1] isposdef(D::LinearAlgebra.Diagonal) in LinearAlgebra at /usr/local/src/julia/julia-1.5/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/diagonal.jl:119
[2] isposdef(A::AbstractArray{T,2} where T) in LinearAlgebra at /usr/local/src/julia/julia-1.5/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/dense.jl:91
[3] isposdef(x::Number) in LinearAlgebra at /usr/local/src/julia/julia-1.5/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/dense.jl:93
[4] isposdef(A::Union{LinearAlgebra.Eigen, LinearAlgebra.GeneralizedEigen}) in LinearAlgebra
 at /usr/local/src/julia/julia-1.5/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/eigen.jl:126
[5] isposdef(C::Union{LinearAlgebra.Cholesky, LinearAlgebra.CholeskyPivoted}) in LinearAlgebra at /usr/local/src/julia/julia-1.5/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/cholesky.jl:551
[6] isposdef(J::LinearAlgebra.UniformScaling) in LinearAlgebra at /usr/local/src/julia/julia-1.5/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/uniformscaling.jl:109
[7] isposdef(F::SuiteSparse.CHOLMOD.Factor) in SuiteSparse.CHOLMOD at /usr/local/src/julia/julia-1.5/usr/share/julia/stdlib/v1.5/SuiteSparse/src/cholmod.jl:1812
3 Likes