Use numpy digitize to get partition map from ordinals