Anacoda MKL没有发挥作用,矩阵运算比matlab慢7倍,求大神提点一下
有大佬用python做科学计算吗;我装好了anaconda之后 矩阵运算比matlab慢7倍 有遇到同样情况的吗;拜求指导一下;截图是我的测试程序# 这是python测试语句
import numpy as np
import datetime
M = 100
N = 100
temp1 = np.arange(0,10000,1).reshape(M,N,order='F')
temp2 = temp1
A = np.zeros_like(temp1)
start = datetime.datetime.now()
for i1 in range(0,1000):
A = A*0 + np.dot( temp1 , temp2 )
end = datetime.datetime.now()
print( (end-start).total_seconds())
# 这是matlab测试程序
clc
clear
close all
M = 100;
N = 100;
temp1 = reshape(0:9999,M,N);
temp2 = temp1;
A = zeros( size(temp1) );
tic
for i1 = 1:1000
A = A*0 + temp1*temp2;
end
toc
#### 运算结果对比
matlab 0.11s左右
python 0.80s左右