torch/torch7 — pull request #53 by nicholas-leonard (2014-07-09 17:01:56+00:00)
Title: torch.type

This PR adds the new utility function `torch.type(obj)`, which is similar to `torch.typename(obj)`, except it defaults to Lua's `type(obj)` when `torch.typename(obj)` returns `nil`.

Its convenient, unit tested and documented.