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

github.com/torch/qtlua.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/qtwidget/init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/qtwidget/init.lua b/packages/qtwidget/init.lua
index 7b0bba5..dcfa7c6 100644
--- a/packages/qtwidget/init.lua
+++ b/packages/qtwidget/init.lua
@@ -255,7 +255,7 @@ function newimage(...)
setmetatable(self, imageClass)
local firstarg = ...
if (G.package.loaded['torch'] and G.package.loaded['libqttorch'] and
- G.torch.typename(firstarg) == "torch.Tensor") then
+ G.torch.type(firstarg):find('torch%..+Tensor')) then
self.port = qt.QtLuaPainter(qt.QImage.fromTensor(firstarg))
else
self.port = qt.QtLuaPainter(...)