diff options
author | Soumith Chintala <soumith@gmail.com> | 2017-02-27 01:02:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 01:02:03 +0300 |
commit | 4ebe222ba12589fb9d86c1d3895d7f509df77b6a (patch) | |
tree | c1468c5fa27c15334e19341aad816aae972a0f97 | |
parent | 2bc6460199cb4c2b37796060ec02edf1e646e7a6 (diff) | |
parent | df28003c73783b0b5d30e831211c2e01c78d7cba (diff) |
Fix #23: Use type instead of torch.type
-rw-r--r-- | init.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |