diff --git a/src/numpy.jl b/src/numpy.jl index f3d523aa..1f96e4cb 100644 --- a/src/numpy.jl +++ b/src/numpy.jl @@ -64,8 +64,12 @@ function npyinitialize() numpy = pyimport("numpy") # emit a warning if both Julia and NumPy are linked with MKL (#433) - if LinearAlgebra.BLAS.vendor() === :mkl && - LinearAlgebra.BLAS.BlasInt === Int64 && hasproperty(numpy, "__config__") + julia_mkl = @static if VERSION < v"1.7" + LinearAlgebra.BLAS.vendor() === :mkl + else + any(contains("mkl"), getfield.(LinearAlgebra.BLAS.get_config().loaded_libs, :libname)) + end + if julia_mkl && LinearAlgebra.BLAS.BlasInt === Int64 && hasproperty(numpy, "__config__") config = numpy."__config__" if hasproperty(config, "blas_opt_info") blaslibs = get(config."blas_opt_info", Vector{String}, "libraries", String[])