When I tried to disable exceptions by setting the XTENSOR_DISABLE_EXCEPTIONS macro, I found that xtensor-blas` did not follow the rule. When I replace the statement:
throw std::runtime_error(
with
XTENSOR_THROW(std::runtime_error,
in all files, it works.