From df28003c73783b0b5d30e831211c2e01c78d7cba Mon Sep 17 00:00:00 2001 From: Heinrich Hartmann Date: Sun, 26 Feb 2017 21:23:25 +0100 Subject: [PATCH] Fix #23: Use type instead of torch.type --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index c214055..863e28f 100644 --- a/init.lua +++ b/init.lua @@ -25,10 +25,10 @@ end function paths.files(s, f) local d = paths.dir(s) local n = 0 - if torch.type(f) == 'string' then + if type(f) == 'string' then local pattern = f f = function(file) return file:find(pattern) end - elseif f and torch.type(f) ~= 'function' then + elseif f and type(f) ~= 'function' then error("Expecting optional arg 2 to be function or string. Got : "..torch.type(f)) end f = f or function(file) return true end