Fixes #633

@lamblin . Unit tests to be added.
OK yes I have checked that, it is already tested in tensor/tests/test_basic.py and tensor/tests/test_elemwise.py. I will test more than 1 values. The reason that I tested only for 1 values is that the rest of the tests in the same file seems to test for only one value as well.