60 template<
typename dtype>
76 if (inStop <= inStart)
90 returnArray.
front() = inStart;
91 returnArray.
back() = inStop;
93 dtype step = (inStop - inStart) /
static_cast<dtype
>(inNum - 1);
95 for (
uint32 i = 1; i < inNum - 1; ++i)
97 returnArray[i] = inStart +
static_cast<dtype
>(i) * step;
105 dtype step = (inStop - inStart) / (inNum);
111 returnArray.
front() = inStart;
113 dtype step = (inStop - inStart) /
static_cast<dtype
>(inNum);
115 for (
uint32 i = 1; i < inNum; ++i)
117 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:2204
const_reference front() const noexcept
Definition: NdArrayCore.hpp:2772
Definition: Coordinate.hpp:45
NdArray< dtype > linspace(dtype inStart, dtype inStop, uint32 inNum=50, bool endPoint=true)
Definition: linspace.hpp:61
std::uint32_t uint32
Definition: Types.hpp:40