Book_1_Ch_07__Python地19页代码有误
sonilics12 opened this issue · 1 comments
sonilics12 commented
# 手动计算矩阵乘法
start_time = time.time() # 开始时刻
for i in range(len(A)):
for j in range(len(B[0])):
for k in range(len(B)):
C[i][j] += A[i][k] * B[k][j]
time_used = stop_time - start_time
print("--- %s seconds ---" %time_used)执行矩阵计算之后没有记录stop_time
Visualize-ML commented
谢谢你!纸质书已经修改,请继续批评指正。
Cheers
…On Sat, Apr 27, 2024 at 9:20 PM Frank FreeMan ***@***.***> wrote:
# 手动计算矩阵乘法start_time = time.time() # 开始时刻
for i in range(len(A)):
for j in range(len(B[0])):
for k in range(len(B)):
C[i][j] += A[i][k] * B[k][j]
time_used = stop_time - start_timeprint("--- %s seconds ---" %time_used)
执行矩阵计算之后没有记录stop_time
—
Reply to this email directly, view it on GitHub
<#162>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZHC6VY3KIGOAHJXA6NAJA3Y7RFHTAVCNFSM6AAAAABG4RDBSKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3DOMRYGQZTOOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>