46 template<
typename dtype,
typename dtypeOut = dtype>
52 return std::complex<dtypeOut>(inReal);
63 template<
typename dtype,
typename dtypeOut = dtype>
69 return std::complex<dtypeOut>(inReal, inImag);
79 template<
typename dtype,
typename dtypeOut = dtype, std::enable_if_t<std::is_arithmetic_v<dtype>,
int> = 0>
86 [](dtype
real) ->
auto { return nc::complex<dtype, dtypeOut>(real); });
99 template<
typename dtype,
typename dtypeOut = dtype>
113 { return nc::complex<dtype, dtypeOut>(real, imag); });
125 template<
typename dtype,
typename dtypeOut = dtype>
131 return inArray.template astype<std::complex<dtypeOut>>();
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:139
const_iterator cbegin() const noexcept
Definition: NdArrayCore.hpp:1365
const Shape & shape() const noexcept
Definition: NdArrayCore.hpp:4591
const_iterator cend() const noexcept
Definition: NdArrayCore.hpp:1673
OutputIt transform(InputIt first, InputIt last, OutputIt destination, UnaryOperation unaryFunction)
Definition: StlAlgorithms.hpp:776
Definition: Cartesian.hpp:40
auto imag(const std::complex< dtype > &inValue)
Definition: imag.hpp:47
auto real(const std::complex< dtype > &inValue)
Definition: real.hpp:48
auto complex(dtype inReal)
Definition: complex.hpp:47