Hi fellows,
Let’s assume, I have a type XYZ which i currently use in my current module , however XYZ is defined in some other module. How can i get to which module XYZ belongs to?
Thanks
Hi fellows,
Let’s assume, I have a type XYZ which i currently use in my current module , however XYZ is defined in some other module. How can i get to which module XYZ belongs to?
Thanks
julia> get_module(name) = eval(parse(string(name)[1:findlast(string(name), '.')-1]))
get_module (generic function with 1 method)
julia> using StaticArrays
julia> get_module(SArray)
StaticArrays
Edit: see below for proper way!
julia> using StaticArrays
julia> @which SArray
StaticArrays