NumCpp
2.1.0
A C++ implementation of the Python Numpy library
reshape.hpp
Go to the documentation of this file.
1
#pragma once
30
31
#include "
NumCpp/Core/Shape.hpp
"
32
#include "
NumCpp/Core/Types.hpp
"
33
#include "
NumCpp/NdArray.hpp
"
34
35
namespace
nc
36
{
37
//============================================================================
38
// Method Description:
52
template
<
typename
dtype>
53
NdArray<dtype>
&
reshape
(
NdArray<dtype>
& inArray,
uint32
inSize)
54
{
55
inArray.
reshape
(inSize);
56
return
inArray;
57
}
58
59
//============================================================================
60
// Method Description:
75
template
<
typename
dtype>
76
NdArray<dtype>
&
reshape
(
NdArray<dtype>
& inArray,
int32
inNumRows,
int32
inNumCols)
77
{
78
inArray.
reshape
(inNumRows, inNumCols);
79
return
inArray;
80
}
81
82
//============================================================================
83
// Method Description:
97
template
<
typename
dtype>
98
NdArray<dtype>
&
reshape
(
NdArray<dtype>
& inArray,
const
Shape
& inNewShape)
99
{
100
inArray.
reshape
(inNewShape);
101
return
inArray;
102
}
103
}
// namespace nc
nc::int32
std::int32_t int32
Definition:
Types.hpp:37
nc::NdArray::reshape
NdArray< dtype > & reshape(size_type inSize)
Definition:
NdArrayCore.hpp:4089
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::reshape
NdArray< dtype > & reshape(NdArray< dtype > &inArray, uint32 inSize)
Definition:
reshape.hpp:53
Shape.hpp
nc
Definition:
Coordinate.hpp:45
Types.hpp
include
NumCpp
Functions
reshape.hpp
Generated by
1.8.17