fix silent type promition for sparse COO tensors with `select` (#82215)
Fixes https://github.com/pytorch/pytorch/issues/82150.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82215
Approved by: https://github.com/amjames, https://github.com/cpuhrsch