dfalbel / torch

torch from R!
http://dfalbel.github.io/torch
Other
50 stars 5 forks source link

Deal with scalar values correctly #8

Closed dfalbel closed 5 years ago

dfalbel commented 5 years ago

We need to start dealing with Scalar values correctly. Currently I am treating them as doubles, but it's not ok to do this.

https://github.com/dfalbel/torch/blob/master/src/tensor.cpp#L580

I think we will need some cpp code to convert an R value to the right scalar. With this done we can treat scalars the right way.

dfalbel commented 5 years ago

closed via f2f374fb670260d5d2d5ea37eed8ba9b319003a1