61 template<
typename dtype>
77 if (inStop <= inStart)
91 returnArray.
front() = inStart;
92 returnArray.
back() = inStop;
94 dtype step = (inStop - inStart) /
static_cast<dtype
>(inNum - 1);
96 for (
uint32 i = 1; i < inNum - 1; ++i)
98 returnArray[i] = inStart +
static_cast<dtype
>(i) * step;
106 dtype step = (inStop - inStart) / (inNum);
112 returnArray.
front() = inStart;
114 dtype step = (inStop - inStart) /
static_cast<dtype
>(inNum);
116 for (
uint32 i = 1; i < inNum; ++i)
118 returnArray[i] = inStart +
static_cast<dtype
>(i) * step;
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:37
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:72
const_reference back() const noexcept
Definition: NdArrayCore.hpp:2344
const_reference front() const noexcept
Definition: NdArrayCore.hpp:2933
Definition: Coordinate.hpp:45
NdArray< dtype > linspace(dtype inStart, dtype inStop, uint32 inNum=50, bool endPoint=true)
Definition: linspace.hpp:62
std::uint32_t uint32
Definition: Types.hpp:40