mailRe: Unused imports


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on January 07, 2009 - 09:41:
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
<sebastien.morin.1@xxxxxxxxx> 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
relax-devel@xxxxxxx

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
relax-devel@xxxxxxx

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




Related Messages


Powered by MHonArc, Updated Wed Jan 07 14:40:16 2009