Code: Select all
@nb.jit(nb.float64[:,:](nb.float64[:,:], nb.float64[:,:]), nopython=True)
def fastDot(X, Y):
return np.dot(X, Y)
< /code>
Und das Ziel ist es, diese Matrix zu verwenden, um eine Matrix von verzögerten Signalen mit den Eigenvektoren zu multiplizieren. Es kann auch jede andere Matrix sein: < /p>
# Compute principal components
PC = fastDot(X, eigenVectors)
< /code>
Hier bekomme ich die folgende Warnung: < /p>
NumbaPerformanceWarning: np.dot() is faster on contiguous arrays, called on (Array(float64, 2, 'A', False, aligned=True), Array(float64, 2, 'A', False, aligned=True))
return np.dot(X, Y)
Code: Select all
eigenVectors, X = np.ascontiguousarray(eigenVectors), np.ascontiguousarray(X)
Kann mir jemand bitte helfen: > [*] Wie kann ich das entfernen?
Vielen Dank im Voraus!