def inner(self, other): """ Return the inner product of the array with complex conjugation. """ cdtype = common_kind(self.dtype, other.dtype) if cdtype.kind == 'c': return _np.sum(self.data.conj() * other, dtype=complex128) else: return inner_inline_real(self, other)
def inner(self, other): """ Return the inner product of the array with complex conjugation. """ cdtype = common_kind(self.dtype, other.dtype) if cdtype.kind == 'c': acum_dtype = complex128 else: acum_dtype = float64 return _np.sum(self.data.conj() * other, dtype=acum_dtype)
def weighted_inner(self, other, weight): """ Return the inner product of the array with complex conjugation. """ if weight is None: return self.inner(other) cdtype = common_kind(self.dtype, other.dtype) if cdtype.kind == 'c': acum_dtype = complex128 else: acum_dtype = float64 return _np.sum(self.data.conj() * other / weight, dtype=acum_dtype)