50 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);
146 template<
typename dtype>
149 Slice sliceCopy(inIndicesSlice);
170 std::vector<uint32> indices;
174 indices.push_back(i);
189 template<
typename dtype>
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:72
size_type size() const noexcept
Definition: NdArrayCore.hpp:4105
Shape shape() const noexcept
Definition: NdArrayCore.hpp:4092
NdArray< dtype > max(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:2828
value_type item() const
Definition: NdArrayCore.hpp:2809
NdArray< bool > contains(value_type inValue, Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:2276
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
uint32 rows
Definition: Core/Shape.hpp:44
uint32 cols
Definition: Core/Shape.hpp:45
A Class for slicing into NdArrays.
Definition: Slice.hpp:44
int32 step
Definition: Slice.hpp:49
int32 start
Definition: Slice.hpp:47
void makePositiveAndValidate(uint32 inArraySize)
Definition: Slice.hpp:141
int32 stop
Definition: Slice.hpp:48
Definition: Coordinate.hpp:45
Axis
Enum To describe an axis.
Definition: Types.hpp:47
NdArray< dtype > unique(const NdArray< dtype > &inArray)
Definition: unique.hpp:54
NdArray< dtype > deleteIndices(const NdArray< dtype > &inArray, const NdArray< uint32 > &inArrayIdxs, Axis inAxis=Axis::NONE)
Definition: deleteIndices.hpp:52
std::uint32_t uint32
Definition: Types.hpp:40