Replace scalar instances of np.sqrt
, np.cos
, etc. with math
alternatives
#1236
Labels
np.sqrt
, np.cos
, etc. with math
alternatives
#1236
Description
Calls to
numpy
square root and trig functions that operate on a single value can be replaced with the correspondingmath
functions.Motivation and Context
While the performance difference is small in absolute terms, the relative improvement is on the order of 10x. Changing these instances could yield a small performance bumps with only a little effort.
The text was updated successfully, but these errors were encountered: