 |
NumCpp
2.1.0
A C++ implementation of the Python Numpy library
|
Go to the documentation of this file.
52 template<
typename dtype>
62 std::vector<dtype> values;
70 values.push_back(inArray[i]);
78 if (indices.
max().item() >= inShape.
rows)
87 for (
uint32 row = 0; row < inShape.
rows; ++row)
94 for (
uint32 col = 0; col < inShape.
cols; ++col)
96 returnArray(rowCounter, col) = inArray(row, col);
106 if (indices.
max().item() >= inShape.
cols)
114 for (
uint32 row = 0; row < inShape.
rows; ++row)
117 for (
uint32 col = 0; col < inShape.
cols; ++col)
124 returnArray(row, colCounter++) = inArray(row, col);
150 template<
typename dtype>
153 Slice sliceCopy(inIndicesSlice);
174 std::vector<uint32> indices;
177 indices.push_back(i);
193 template<
typename dtype>
value_type item() const
Definition: NdArrayCore.hpp:2958
NdArray< bool > contains(value_type inValue, Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:2348
int32 stop
Definition: Slice.hpp:49
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4312
void makePositiveAndValidate(uint32 inArraySize)
Definition: Slice.hpp:114
NdArray< dtype > max(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:2979
std::uint32_t uint32
Definition: Types.hpp:41
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
int32 start
Definition: Slice.hpp:48
NdArray< dtype > unique(const NdArray< dtype > &inArray)
Definition: unique.hpp:57
size_type size() const noexcept
Definition: NdArrayCore.hpp:4326
uint32 cols
Definition: Core/Shape.hpp:46
Axis
Enum To describe an axis.
Definition: Types.hpp:47
int32 step
Definition: Slice.hpp:50
Definition: Coordinate.hpp:45
uint32 rows
Definition: Core/Shape.hpp:45
NdArray< dtype > deleteIndices(const NdArray< dtype > &inArray, const NdArray< uint32 > &inArrayIdxs, Axis inAxis=Axis::NONE)
Definition: deleteIndices.hpp:53
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37
A Class for slicing into NdArrays.
Definition: Slice.hpp:44