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:
authorDominik Grewe <dominik.grewe@gmail.com>2016-02-02 20:36:41 +0300
committerDominik Grewe <dominik.grewe@gmail.com>2016-02-02 20:36:41 +0300
commite13af1d494f6aa95beb9fb542df43305d7fed587 (patch)
tree766a13ea06a1f13aca37c6f8b283b99a09c5f4c5 /TensorMath.lua
parent75a433a8bf0b7aad518408a874e0d100ac2b2c53 (diff)
Revert "Adding argmax index as second return value to max/min calls without specified dimension"
Diffstat (limited to 'TensorMath.lua')
-rw-r--r--TensorMath.lua19
1 files changed, 2 insertions, 17 deletions
diff --git a/TensorMath.lua b/TensorMath.lua
index e27cdc2..88820d4 100644
--- a/TensorMath.lua
+++ b/TensorMath.lua
@@ -500,23 +500,8 @@ for _,Tensor in ipairs({"ByteTensor", "CharTensor",
for _,name in ipairs({"min", "max"}) do
wrap(name,
cname(name .. "all"),
- {{name=real, creturned=true},
- {name="IndexTensor", default=true, returned=true, noreadadd=true,
- precall = function(arg)
- local txt = {}
- return table.concat(txt, '\n')
- end,
- postcall = function(arg)
- local txt = {}
- table.insert(txt, string.format('if(arg%d_idx)', arg.i)) -- means it was passed as arg
- table.insert(txt, string.format('lua_pushvalue(L, arg%d_idx);', arg.i))
- table.insert(txt, string.format('else')) -- means we did a new()
- table.insert(txt, string.format('luaT_pushudata(L, arg%d, "torch.LongTensor");', arg.i))
- table.insert(txt, string.format("THLongTensor_add(arg%d, arg%d, 1);", arg.i, arg.i));
- return table.concat(txt, '\n')
- end
- },
- {name=Tensor}},
+ {{name=Tensor},
+ {name=real, creturned=true}},
cname(name),
{{name=Tensor, default=true, returned=true},
{name="IndexTensor", default=true, returned=true, noreadadd=true},