18 void reportError(
int errNum,
const char *errMsg) { errorMsgStream << errMsg; }
25 ErrorHandler() { astSetPutErr(reportError); }
27 ErrorHandler(ErrorHandler
const &) =
delete;
28 ErrorHandler(ErrorHandler &&) =
delete;
29 ErrorHandler &operator=(ErrorHandler
const &) =
delete;
30 ErrorHandler &operator=(ErrorHandler &&) =
delete;
33 auto errMsg = errorMsgStream.
str();
35 errorMsgStream.
clear();
40 errorMsgStream.
str(
"");
49 void assertOK(AstObject *rawPtr1, AstObject *rawPtr2) {
53 static ErrorHandler *errHandler =
new ErrorHandler();
70 int nPoints = vec.
size() / nAxes;
71 if (nPoints * nAxes != vec.
size()) {
73 os <<
"vec length = " << vec.
size() <<
" not a multiple of nAxes = " << nAxes;
76 Array2D::Index shape = ndarray::makeVector(nAxes, nPoints);
77 Array2D::Index strides = ndarray::makeVector(nPoints, 1);
78 return external(vec.
data(), shape, strides);