Hi Ed, Thanks for this explanation. I really thought I was doing something wrong when I went into this exception... Now, I feel better !
As you say, it is probably better to remove those things that are not caught by the test suite and, if they are problematic (if a bug is created by these removals), write a test to catch them in the future... Regards, Séb Edward d'Auvergne wrote: > Hi, > > Here you have found one of the exceptions. Some data in the XML file > is stored as the text representation of the numpy array. This looks > something like 'array([0.0, 0.1, 0.2])'. The eval() function > evaluates the text as if it was python code, and hence it needs the > array function. Where ever eval(), evalfile(), etc. are used, then > the import statements that appear not to be used could be quite > important. I think though that it can be removed if the test suite > doesn't detect a problem. If it really is a problem, then after a > user identifies the bug we can add another test to catch it and then > fix it. > > Regards, > > Edward > > > On Wed, Jan 7, 2009 at 3:54 AM, Sébastien Morin > <[email protected]> wrote: > >> Hi again, >> >> I just found an import which seemed to be unused, but, when removed, >> gave rise to several errors... >> >> This is >> 'from numpy import array' >> in >> 'data/relax_xml.py' >> >> In fact, if this one is removed, the code complains about 'array' not >> being defined... This seems to arise from line 89 in >> 'data/relax_xml.py', although this line is only: >> 'return eval(val)' >> >> Could you explain this to me if you understand the problem ? >> >> Thank you. >> >> >> Séb :) >> >> >> >> Sébastien Morin wrote: >> >>> Hi, >>> >>> I found by chance some unused imports and, then, searched for more in >>> the different parts of the code... I found many and removed them. >>> >>> I hope nothing was broken in this cleanup, although I checked after each >>> change if the test-suite still passed. >>> >>> Let me know if there were some problem... >>> >>> Regards, >>> >>> >>> Séb >>> >>> >>> >>> >>> _______________________________________________ >>> relax (http://nmr-relax.com) >>> >>> This is the relax-devel mailing list >>> [email protected] >>> >>> To unsubscribe from this list, get a password >>> reminder, or change your subscription options, >>> visit the list information page at >>> https://mail.gna.org/listinfo/relax-devel >>> >>> >>> >> >> _______________________________________________ >> relax (http://nmr-relax.com) >> >> This is the relax-devel mailing list >> [email protected] >> >> To unsubscribe from this list, get a password >> reminder, or change your subscription options, >> visit the list information page at >> https://mail.gna.org/listinfo/relax-devel >> >> > > _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel

