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:
authorkoray kavukcuoglu <koray@kavukcuoglu.org>2013-02-11 20:50:16 +0400
committerkoray kavukcuoglu <koray@kavukcuoglu.org>2013-02-11 20:50:16 +0400
commite098ae1382c3a635a696bd66aca29a45af25cad5 (patch)
tree2260a69c37f2d331125a694094c3bae27ca0e3f1 /Tensor.lua
parenta3289c4f51ed8680383915cda0bf6c57268a14bb (diff)
make tensor.expand create a tensor from correct type, not default type.
Diffstat (limited to 'Tensor.lua')
-rw-r--r--Tensor.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tensor.lua b/Tensor.lua
index dd12918..0ee9d2f 100644
--- a/Tensor.lua
+++ b/Tensor.lua
@@ -310,7 +310,7 @@ function Tensor.expand(tensor,...)
end
-- create new view, with singleton expansion:
- tensor = torch.Tensor(tensor:storage(), tensor:storageOffset(),
+ tensor = tensor.new(tensor:storage(), tensor:storageOffset(),
tensor_size, tensor_stride)
return tensor
end