Say I have some float number, how would I create a tensor from only this one number?

Simple tensor constructor would be nice, like Tensor(45) or even initializer list Tensor({23, 5, 64})

Does `torch::tensor(1.23)`

not work?

Best regards

Thomas

oh, ok, I see what I did wrong. I had torch::Tensor(1.23) not torch::tensor(1.23). This is a bit confusing. I guess I got this from python, because in python it was possible to write FloatTensor(1.23).

Thank you