NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
reshape.hpp
Go to the documentation of this file.
1
#pragma once
29
30
#include "
NumCpp/Core/Shape.hpp
"
31
#include "
NumCpp/Core/Types.hpp
"
32
#include "
NumCpp/NdArray.hpp
"
33
34
namespace
nc
35
{
36
//============================================================================
37
// Method Description:
51
template
<
typename
dtype>
52
NdArray<dtype>
&
reshape
(
NdArray<dtype>
& inArray,
uint32
inSize)
53
{
54
inArray.
reshape
(inSize);
55
return
inArray;
56
}
57
58
//============================================================================
59
// Method Description:
74
template
<
typename
dtype>
75
NdArray<dtype>
&
reshape
(
NdArray<dtype>
& inArray,
int32
inNumRows,
int32
inNumCols)
76
{
77
inArray.
reshape
(inNumRows, inNumCols);
78
return
inArray;
79
}
80
81
//============================================================================
82
// Method Description:
96
template
<
typename
dtype>
97
NdArray<dtype>
&
reshape
(
NdArray<dtype>
& inArray,
const
Shape
& inNewShape)
98
{
99
inArray.
reshape
(inNewShape);
100
return
inArray;
101
}
102
}
// namespace nc
nc::int32
std::int32_t int32
Definition:
Types.hpp:36
nc::NdArray::reshape
NdArray< dtype > & reshape(size_type inSize)
Definition:
NdArrayCore.hpp:4133
nc::NdArray< dtype >
nc::uint32
std::uint32_t uint32
Definition:
Types.hpp:40
NdArray.hpp
nc::Shape
A Shape Class for NdArrays.
Definition:
Core/Shape.hpp:40
nc::reshape
NdArray< dtype > & reshape(NdArray< dtype > &inArray, uint32 inSize)
Definition:
reshape.hpp:52
Shape.hpp
nc
Definition:
Coordinate.hpp:44
Types.hpp
include
NumCpp
Functions
reshape.hpp
Generated by
1.8.17