Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Köppe <tkoeppe@google.com>2016-05-04 15:36:06 +0300
committerThomas Köppe <tkoeppe@google.com>2016-05-04 15:36:06 +0300
commit9592f7f45b2bbe2ea4a022c04e08e33045a1f127 (patch)
tree3ffc79a3011966e8ff51ca86a471863182683df0 /generic
parent599222ec29bfd7a1eb6c38365b6db2aeccda291e (diff)
[TensorOperator.c] Make unary negation expression have real type, not double
Diffstat (limited to 'generic')
-rw-r--r--generic/TensorOperator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/TensorOperator.c b/generic/TensorOperator.c
index 7d90523..22506c0 100644
--- a/generic/TensorOperator.c
+++ b/generic/TensorOperator.c
@@ -60,7 +60,7 @@ static int torch_TensorOperator_(__sub__)(lua_State *L)
{
THTensor_(resizeAs)(r, tensor1);
THTensor_(copy)(r, tensor1);
- THTensor_(add)(r, r, -luaL_checknumber(L, 2));
+ THTensor_(add)(r, r, -(real)luaL_checknumber(L, 2));
}
else
{