Fixed _format_labels in tile.py for np.inf.

Fixes issue 3415.