Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
%timeit在 IPython中,当使用魔法时
%timeit
%timeit 语句 1;声明2;
测量statement1或statement1一起statement2(顺序)?我想测量后者。
statement1
statement2
两种说法。您可以确认使用模块中的sleep功能time:
sleep
time
In [4]: %timeit time.sleep(1); time.sleep(5) 1 loops, best of 3: 6 s per loop