Fixes #633

@lamblin . Unit tests to be added.
Since this is already tested in both tensor/tests/test_basic.py and tensor/tests/test_elemwise.py. Should I remove them?