NumCpp  2.1.0
A C++ implementation of the Python Numpy library
tile.hpp
Go to the documentation of this file.
1 #pragma once
30 
31 #include "NumCpp/Core/Types.hpp"
32 #include "NumCpp/NdArray.hpp"
33 
34 namespace nc
35 {
36  //============================================================================
37  // Method Description:
48  template<typename dtype>
49  NdArray<dtype> tile(const NdArray<dtype>& inArray, uint32 inNumRows, uint32 inNumCols)
50  {
51  return inArray.repeat(inNumRows, inNumCols);
52  }
53 
54  //============================================================================
55  // Method Description:
65  template<typename dtype>
66  NdArray<dtype> tile(const NdArray<dtype>& inArray, const Shape& inReps)
67  {
68  return inArray.repeat(inReps);
69  }
70 } // namespace nc
nc::NdArray< dtype >
nc::uint32
std::uint32_t uint32
Definition: Types.hpp:41
NdArray.hpp
nc::Shape
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
nc::tile
NdArray< dtype > tile(const NdArray< dtype > &inArray, uint32 inNumRows, uint32 inNumCols)
Definition: tile.hpp:49
nc
Definition: Coordinate.hpp:45
Types.hpp
nc::NdArray::repeat
NdArray< dtype > repeat(uint32 inNumRows, uint32 inNumCols) const
Definition: NdArrayCore.hpp:4016