 |
NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Go to the documentation of this file.
51 template<
typename dtype>
61 std::vector<dtype> values;
69 values.push_back(inArray[i]);
77 if (indices.
max().item() >= inShape.
rows)
86 for (
uint32 row = 0; row < inShape.
rows; ++row)
93 for (
uint32 col = 0; col < inShape.
cols; ++col)
95 returnArray(rowCounter, col) = inArray(row, col);
105 if (indices.
max().item() >= inShape.
cols)
113 for (
uint32 row = 0; row < inShape.
rows; ++row)
116 for (
uint32 col = 0; col < inShape.
cols; ++col)
123 returnArray(row, colCounter++) = inArray(row, col);
149 template<
typename dtype>
152 Slice sliceCopy(inIndicesSlice);
173 std::vector<uint32> indices;
176 indices.push_back(i);
192 template<
typename dtype>
value_type item() const
Definition: NdArrayCore.hpp:2975
NdArray< bool > contains(value_type inValue, Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:2365
int32 stop
Definition: Slice.hpp:48
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4356
void makePositiveAndValidate(uint32 inArraySize)
Definition: Slice.hpp:137
NdArray< dtype > max(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:2996
std::uint32_t uint32
Definition: Types.hpp:40
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:40
int32 start
Definition: Slice.hpp:47
NdArray< dtype > unique(const NdArray< dtype > &inArray)
Definition: unique.hpp:56
size_type size() const noexcept
Definition: NdArrayCore.hpp:4370
uint32 cols
Definition: Core/Shape.hpp:45
Axis
Enum To describe an axis.
Definition: Types.hpp:46
int32 step
Definition: Slice.hpp:49
Definition: Coordinate.hpp:44
uint32 rows
Definition: Core/Shape.hpp:44
NdArray< dtype > deleteIndices(const NdArray< dtype > &inArray, const NdArray< uint32 > &inArrayIdxs, Axis inAxis=Axis::NONE)
Definition: deleteIndices.hpp:52
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
A Class for slicing into NdArrays.
Definition: Slice.hpp:43