From fa14ba94f855564b48a6eb9aa7ab168be6d0fc14 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Sun, 8 Dec 2013 13:41:44 +0000 Subject: [PATCH] Check for module version other than 0 or 2 --- BioLogic.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BioLogic.py b/BioLogic.py index e1c102b..f41a558 100644 --- a/BioLogic.py +++ b/BioLogic.py @@ -225,6 +225,9 @@ class MPRfile: VMPdata_dtype.itemsize * n_data_points) self.data = np.frombuffer(data_module['data'], dtype=VMPdata_dtype, 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 ## column types at all np.testing.assert_array_equal(column_types,