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: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:139
const_reference back() const noexcept
Definition: NdArrayCore.hpp:2287
const_reference front() const noexcept
Definition: NdArrayCore.hpp:2860
Definition: Cartesian.hpp:40
NdArray< dtype > linspace(dtype inStart, dtype inStop, uint32 inNum=50, EndPoint endPoint=EndPoint::YES)
Definition: linspace.hpp:61
std::uint32_t uint32
Definition: Types.hpp:40
EndPoint
End Point boolean.
Definition: Enums.hpp:74