NumCpp  2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
var.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <algorithm>
31#include <complex>
32
35#include "NumCpp/NdArray.hpp"
36
37namespace nc
38{
39 //============================================================================
40 // Method Description:
50 template<typename dtype>
52 {
54
56 const auto function = [](double& value) -> void { value *= value; };
57
59 return stdValues;
60 }
61
62 //============================================================================
63 // Method Description:
73 template<typename dtype>
75 {
77
79 const auto function = [](std::complex<double>& value) -> void { value *= value; };
80
82 return stdValues;
83 }
84} // namespace nc
#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
void for_each(InputIt first, InputIt last, UnaryFunction f)
Definition StlAlgorithms.hpp:225
Definition Cartesian.hpp:40
NdArray< double > stdev(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition stdev.hpp:52
Axis
Enum To describe an axis.
Definition Enums.hpp:36
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59
NdArray< double > var(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition var.hpp:51