NumCpp  1.0
A C++ implementation of the Python Numpy library
zeros_like.hpp
Go to the documentation of this file.
1 #pragma once
30 
31 #include "NumCpp/NdArray.hpp"
33 
34 namespace nc
35 {
36  //============================================================================
37  // Method Description:
47  template<typename dtypeOut, typename dtype>
49  {
51 
52  NdArray<dtypeOut> returnArray(inArray.shape());
53  returnArray.zeros();
54  return returnArray;
55  }
56 }
StaticAsserts.hpp
nc::NdArray::shape
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4296
nc::zeros_like
NdArray< dtypeOut > zeros_like(const NdArray< dtype > &inArray)
Definition: zeros_like.hpp:48
STATIC_ASSERT_ARITHMETIC_OR_COMPLEX
#define STATIC_ASSERT_ARITHMETIC_OR_COMPLEX(dtype)
Definition: StaticAsserts.hpp:51
nc::NdArray
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:75
NdArray.hpp
nc::NdArray::zeros
NdArray< dtype > & zeros() noexcept
Definition: NdArrayCore.hpp:4609
nc
Definition: Coordinate.hpp:45