Author: tlinnet Date: Mon Dec 8 13:47:57 2014 New Revision: 27013 URL: http://svn.gna.org/viewcvs/relax?rev=27013&view=rev Log: For systemtest Nmrglue.test_save_state reshaped the numpy array, and changed to float32. This shows that the data can indeed be saved, in the shape is also stored, and the dtype. Task #7873 (https://gna.org/task/index.php?7873): Write wrapper function to nmrglue, to read .ft2 files and process them. Homepage: http://www.nmrglue.com/ Link to nmrglue discussion: https://groups.google.com/forum/#!forum/nmrglue-discuss The code is develop at Github: https://github.com/jjhelmus/nmrglue/ Google code: https://code.google.com/p/nmrglue/ Documentation: http://nmrglue.readthedocs.org/en/latest/index.html Modified: branches/nmrglue/test_suite/system_tests/nmrglue.py Modified: branches/nmrglue/test_suite/system_tests/nmrglue.py URL: http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/nmrglue.py?rev=27013&r1=27012&r2=27013&view=diff ============================================================================== --- branches/nmrglue/test_suite/system_tests/nmrglue.py (original) +++ branches/nmrglue/test_suite/system_tests/nmrglue.py Mon Dec 8 13:47:57 2014 @@ -403,14 +403,16 @@ print("Decoding") r = base64.decodestring(cdp.nmrglue_data[sp_id]) q = frombuffer(r,dtype=float32) - cdp.nmrglue_data[sp_id] = q + cdp.nmrglue_data[sp_id] = q.reshape((512, 4096)) print("Type of decoded is:", type(cdp.nmrglue_data[sp_id])) print("Shape of numpy array is:", cdp.nmrglue_data[sp_id].shape) # Test data. print("Testing data array.") print("Shape of data is %ix%i, and of cdp.nmrglue_data is %ix%i"%(data.shape[0], data.shape[1], cdp.nmrglue_data[sp_id].shape[0], cdp.nmrglue_data[sp_id].shape[1])) - self.assertEqual(data, cdp.nmrglue_data[sp_id]) + test = data == cdp.nmrglue_data[sp_id] + print(test.all()) + self.assert_(test.all()) print("Testing dics.") # Make tests that they are the same.