|
>>> timeit np.dot(np.array([1,2,3]),np.array([1,2,3]))
>>>The slowest run took 5.85 times longer than the fastest. This could mean that an intermediate result is being cached
100000 loops, best of 3: 4.74 µs per loop
>>>timeit np.dot([1,2,3],np.array([1,2,3]))
>>>The slowest run took 7.57 times longer than the fastest. This could mean that an intermediate result is being cached
100000 loops, best of 3: 4.67 µs per loop
这两句到底哪个耗时少点
|
|