Open mbillingr opened 9 years ago
I'm not that firm in broadcasting yet, do you have a suggestion in the case of dot_special
?
return np.dot(x.transpose((2, 0, 1)), a).transpose((1, 2, 0))
is 13 times faster than the list comprehension with the data i'm currently working with.
Note that the arguments to transpose would need to be changed for the new data orientation.
Alright. I just learned that transpose
takes an axes argument :-).
Many places in the code use list comprehensions where vectorized numpy functions could be used instead (example:
datatools.dot_special
).We should find and fix these.