Add function to get a partition histogram given its ordinals