NumCpp
2.16.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
full.hpp
Go to the documentation of this file.
1
28
#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:
46
template
<
typename
dtype>
47
NdArray<dtype>
full
(
uint32
inSquareSize
,
dtype
inFillValue
)
48
{
49
NdArray<dtype>
returnArray
(
inSquareSize
,
inSquareSize
);
50
returnArray
.fill(
inFillValue
);
51
return
returnArray
;
52
}
53
54
//============================================================================
55
// Method Description:
65
template
<
typename
dtype>
66
NdArray<dtype>
full
(
uint32
inNumRows
,
uint32
inNumCols
,
dtype
inFillValue
)
67
{
68
NdArray<dtype>
returnArray
(
inNumRows
,
inNumCols
);
69
returnArray
.fill(
inFillValue
);
70
return
returnArray
;
71
}
72
73
//============================================================================
74
// Method Description:
83
template
<
typename
dtype>
84
NdArray<dtype>
full
(
const
Shape
&
inShape
,
dtype
inFillValue
)
85
{
86
return
full
(
inShape
.rows,
inShape
.cols,
inFillValue
);
87
}
88
}
// namespace nc
Shape.hpp
NdArray.hpp
Types.hpp
nc::NdArray
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition
NdArrayCore.hpp:139
nc::Shape
A Shape Class for NdArrays.
Definition
Core/shape.hpp:41
nc
Definition
Cartesian.hpp:40
nc::full
NdArray< dtype > full(uint32 inSquareSize, dtype inFillValue)
Definition
full.hpp:47
nc::arange
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition
arange.hpp:59
nc::uint32
std::uint32_t uint32
Definition
Types.hpp:40
include
NumCpp
Functions
full.hpp
Generated by
1.9.8