I am trying to generate random numbers of shape {10} and range between -0.5 and 0.5
#include <iostream>
#include <xtensor/xio.hpp>
#include <xtensor/xrandom.hpp>
int main() {
xt::xarray<double> a = xt::random::randn<double>({10}, -0.5, 0.5);
std::cout << a;
return 0;
}
but it's returning an array
{-0.432735, -0.573191, -0.269675, -1.435692, -0.418144, -0.607127,
-0.350702, -0.913972, -0.494892, 0.027733}
where -0.573191 is smaller and -1.435692 is bigger than range