Check for module version other than 0 or 2

This commit is contained in:
Chris Kerr
2013-12-08 13:41:44 +00:00
parent 2724e2a833
commit fa14ba94f8

View File

@@ -225,6 +225,9 @@ class MPRfile:
VMPdata_dtype.itemsize * n_data_points) VMPdata_dtype.itemsize * n_data_points)
self.data = np.frombuffer(data_module['data'], dtype=VMPdata_dtype, self.data = np.frombuffer(data_module['data'], dtype=VMPdata_dtype,
offset=405) offset=405)
else:
raise ValueError("Unrecognised version for data module: %d" %
data_module['version'])
## No idea what these 'column types' mean or even if they are actually ## No idea what these 'column types' mean or even if they are actually
## column types at all ## column types at all
np.testing.assert_array_equal(column_types, np.testing.assert_array_equal(column_types,