51 template<
typename dtype>
58 uint32 shift = std::abs(inShift) % inArray.
size();
61 shift = inArray.
size() - shift;
73 uint32 shift = std::abs(inShift) % inShape.
cols;
76 shift = inShape.
cols - shift;
80 for (
uint32 row = 0; row < inShape.
rows; ++row)
83 returnArray.
begin(row) + shift,
84 returnArray.
end(row));
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition Error.hpp:37
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
size_type size() const noexcept
Definition NdArrayCore.hpp:4604
iterator end() noexcept
Definition NdArrayCore.hpp:1623
self_type transpose() const
Definition NdArrayCore.hpp:4963
const Shape & shape() const noexcept
Definition NdArrayCore.hpp:4591
iterator begin() noexcept
Definition NdArrayCore.hpp:1315
A Shape Class for NdArrays.
Definition Core/shape.hpp:41
uint32 rows
Definition Core/shape.hpp:44
uint32 cols
Definition Core/shape.hpp:45
void rotate(ForwardIt first, ForwardIt firstN, ForwardIt last) noexcept
Definition StlAlgorithms.hpp:508
Definition Cartesian.hpp:40
Axis
Enum To describe an axis.
Definition Enums.hpp:36
@ ROW
Definition Enums.hpp:38
@ COL
Definition Enums.hpp:39
@ NONE
Definition Enums.hpp:37
std::int32_t int32
Definition Types.hpp:36
NdArray< dtype > roll(const NdArray< dtype > &inArray, int32 inShift, Axis inAxis=Axis::NONE)
Definition roll.hpp:52
std::uint32_t uint32
Definition Types.hpp:40