Reputation: 2632
I have defined the following variable
julia> X = (1:10) * ones(1,10)
which defines a matrix with each row equals to the same number and the numbers in the column increasing from 1 to 10 by 1. I want to know which method used Julia for the function *
. How can I ask that to Julia?
Upvotes: 11
Views: 1805
Reputation: 2131
@which
is what you are looking for:
@which (1:10) * ones(1, 10)
# *(A::AbstractArray{T,1}, B::AbstractArray{T,2}) at linalg/matmul.jl:89
in Jupyter it will also hyperlink to the corresponding line of code where the method is defined in Julia's GitHub.
Upvotes: 13