Fix bug introduced by gh-1794 merged 7 days ago.

This make the perform method of Elemwise return the wrong dtype in some cases.
Merge pull request #1803 from nouiz/dtype_fix

Fix bug introduced by gh-1794 merged 7 days ago.