MCPcopy Create free account
hub / github.com/numpy/numpy / mk_complex_array_conjugate_pair

Function mk_complex_array_conjugate_pair

numpy/linalg/umath_linalg.cpp:2191–2205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2189
2190template<typename complextyp, typename typ>
2191static inline void
2192mk_complex_array_conjugate_pair(complextyp *c,
2193 const typ *r,
2194 size_t n)
2195{
2196 size_t iter;
2197 for (iter = 0; iter < n; ++iter) {
2198 typ re = r[iter];
2199 typ im = r[iter+n];
2200 c[iter].r = re;
2201 c[iter].i = im;
2202 c[iter+n].r = re;
2203 c[iter+n].i = -im;
2204 }
2205}
2206
2207/*
2208 * make the complex eigenvectors from the real array produced by sgeev/zgeev.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected