47 template<
typename dtype>
52 std::istringstream inputStream(inStr);
53 auto values = std::vector<dtype>{};
55 for (std::string segment; std::getline(inputStream, segment, inSep);)
57 if (!inputStream.fail())
59 std::istringstream segmentStream(segment);
60 while (segmentStream >> value)
62 if (!inputStream.fail())
64 values.push_back(value);
#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
Definition: Cartesian.hpp:40
NdArray< dtype > fromstring(const std::string &inStr, const char inSep=' ')
Definition: fromstring.hpp:48