Fix Scalar formatting (#53229)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53229
Scalar formatting was assuming that everything non-float was integral. This would output bools as ints, and even worse, it would crash for complex.
This PR fixes that.
ghstack-source-id: 125886979
(Note: this ignores all push blocking failures!)
Test Plan: waitforsandcastle
Reviewed By: ezyang
Differential Revision: D26800345
fbshipit-source-id: 1a9efd085276b40d6fb399d255a6bbd7d5f3619f