optic.utils.dotNumba

dotNumba(a, b)

Computes the dot product of two 1D arrays in a Numba-compatible way.

This function is equivalent to np.dot for 1D arrays but can be JIT-compiled with Numba for accelerated execution.

Parameters:
  • a (ndarray of shape (N,)) – First input array (complex-valued).

  • b (ndarray of shape (N,)) – Second input array (complex-valued).

Returns:

result – The dot product of a and b, computed as the sum of element-wise products.

Return type:

complex

Notes

  • Both input arrays must have the same length.

  • This function initializes the result as a complex number to support complex-valued operations.