add exception for bad dimensions in dataset reduce method