Default to float in a nicer way
@@ -105,9 +105,7 @@ def main():
dataset = get_dataset(args.dataset)
dimension = len(dataset['train'][0]) # TODO(erikbern): ugly
- point_type = 'float'
- if 'point_type' in dataset.attrs:
- point_type = dataset.attrs['point_type']
+ point_type = dataset.attrs.get('point_type', 'float')
distance = dataset.attrs['distance']
definitions = get_definitions(args.definitions, dimension, point_type, distance, args.count)
