cosine_sum_1d¶
- mdhelper.algorithm.accelerated.cosine_sum_1d(x: ndarray[float]) float [source]¶
Serial Numba-accelerated sum of the cosines of the elements of a one-dimensional NumPy array \(\mathbf{x}\).
\[\sum_{i=1}^N\cos(x_i)\]- Parameters:
- xnp.ndarray
Vector \(\mathbf{x}\).
Shape: \((N,)\).
- Returns:
- sfloat
Sum of the cosines of the elements of the vector \(\mathbf{x}\).