Skip to content

Commit

Permalink
Fix #23: Use type instead of torch.type
Browse files Browse the repository at this point in the history
  • Loading branch information
HeinrichHartmann committed Feb 26, 2017
1 parent 2bc6460 commit df28003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit df28003

Please sign in to comment.