Speeding up numpy.dot

后端 未结 4 1593
[愿得一人]
[愿得一人] 2021-02-04 10:49

I\'ve got a numpy script that spends about 50% of its runtime in the following code:

s = numpy.dot(v1, v1)

where

v1 = v[1

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 11:16

    Only thing I can think of to accelerate this is to make sure your NumPy installation is compiled against an optimized BLAS library (like ATLAS). numpy.dot() is one of only a few NumPy functions that make use of BLAS.

提交回复
热议问题