59 template<
typename dtype>
75 if (inStop <= inStart)
89 returnArray.
front() = inStart;
90 returnArray.
back() = inStop;
92 dtype step = (inStop - inStart) /
static_cast<dtype
>(inNum - 1);
94 for (
uint32 i = 1; i < inNum - 1; ++i)
96 returnArray[i] = inStart +
static_cast<dtype
>(i) * step;
104 dtype step = (inStop - inStart) / (inNum);
110 returnArray.
front() = inStart;
112 dtype step = (inStop - inStart) /
static_cast<dtype
>(inNum);
114 for (
uint32 i = 1; i < inNum; ++i)
116 returnArray[i] = inStart +
static_cast<dtype
>(i) * step;
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:138
const_reference back() const noexcept
Definition: NdArrayCore.hpp:2230
const_reference front() const noexcept
Definition: NdArrayCore.hpp:2783
Definition: Coordinate.hpp:45
NdArray< dtype > linspace(dtype inStart, dtype inStop, uint32 inNum=50, bool endPoint=true)
Definition: linspace.hpp:60
std::uint32_t uint32
Definition: Types.hpp:40