Can someone explain why the following occurs?
a = numpy.zeros((100))
b = numpy.ones((10))
a[20:30] = b # okay
eval('a[50:60] = b') # raises SyntaxError: invalid syntax
Is there some line mangling that the interpretor does that eval doesn't do?
I see there's room for global and local parameters to eval. Would setting one of those be the answer?
Cheers,
Angus.
--
AJC McMorland, PhD Student
Physiology, University of Auckland
Armourer, Auckland University Fencing
Secretary, Fencing North Inc.
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion