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

github.com/torch/paths.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2017-02-27 01:02:03 +0300
committerGitHub <noreply@github.com>2017-02-27 01:02:03 +0300
commit4ebe222ba12589fb9d86c1d3895d7f509df77b6a (patch)
treec1468c5fa27c15334e19341aad816aae972a0f97
parent2bc6460199cb4c2b37796060ec02edf1e646e7a6 (diff)
parentdf28003c73783b0b5d30e831211c2e01c78d7cba (diff)
Merge pull request #24 from HeinrichHartmann/pr-no-torchHEADmaster
Fix #23: Use type instead of torch.type
-rw-r--r--init.lua4
1 files 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