Author: bugman Date: Fri Nov 19 14:46:34 2010 New Revision: 11688 URL: http://svn.gna.org/viewcvs/relax?rev=11688&view=rev Log: Improved the diffusion tensor print out. Modified: 1.3/data/data_classes.py Modified: 1.3/data/data_classes.py URL: http://svn.gna.org/viewcvs/relax/1.3/data/data_classes.py?rev=11688&r1=11687&r2=11688&view=diff ============================================================================== --- 1.3/data/data_classes.py (original) +++ 1.3/data/data_classes.py Fri Nov 19 14:46:34 2010 @@ -22,6 +22,7 @@ # Python module imports. from re import search +from numpy import ndarray # Empty data container. @@ -44,8 +45,17 @@ if search("^_", name): continue + # Get the object. + obj = getattr(self, name) + + # Numpy matrices. + if isinstance(obj, ndarray) and isinstance(obj[0], ndarray): + spacer = '\n' + else: + spacer = '' + # Generate the text. - text = text + "%-25s%-100s\n" % (name, repr(getattr(self, name))) + text = text + "%-25s%s%-100s\n" % (name, spacer, repr(obj)) # Return the lot. return text