I think you can use tensor.data<float>(), but what are you doing with this c++ numpy implementation that you can’t do directly in libtorch?  Assuming you are using this 32, it doesn’t look like there is anything there that you couldn’t do while keeping your data as a tensor.