Do not cast .transform() output back to input dtype (closes #10972)
 - [x] closes #10972
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master | flake8 --diff``
 - [x] whatsnew entry

Maybe need more tests, and check performance?