choose output type appropriate for input in 2d transform

Fixes #9