torch/torch7 — pull request #39 by d11 (2014-05-09 11:32:57+00:00)
Title: Fix numel() cwrap return type

It should always be long (the type returned by the numel C function) - it was being cast to the element type of the tensor.

This caused incorrect results; for example:
```lua
t7> x = torch.ByteTensor(3,100,100)
t7> =x:numel()
48
t7> =x:nElement()
30000
t7> y = torch.DoubleTensor(3,100,100)
t7> =y:numel()
30000
t7> =y:nElement()
30000
```

Also added test for nElement and numel.