Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the 5 'exec' calls definining polynomial classes.
Currently there are 5 places under numpy/polynomial which do something like: exec polytemplate.substitute(name='Hermite', nick='herm', domain='[-1,1]') I have changed those so there are start/end markers, like ... I have edited polytemplate.py so that it implements a __main__ which finds those block markers and replaces the content with the appropriate "polytemplate" substitution. This means that if you edit the template then you will need to manually run 'polytemplate.py' so that the dependent files are rebuilt based on the new template. The performance of python -c 'import time; t1=time.time(); import numpy; print time.time()-t1' goes from 0.079 seconds to 0.057 seconds (best of 10), for an import speedup of ~25%.
- Loading branch information