id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,workpackage 1218,numpy/scipy cause syntax errors in python model builder,pkienzle,piotr,"If the code in your simple python model contains numpy, np or scipy then it will cause a syntax error when you try to run the model. This is because the model builder does not include `\n` when it inserts the numpy import line. Better would be to place the imports at the top of the template for all models instead of including it dynamically in the function definition. The model reload problems should be fixed, so this should now work. This will make the code simpler, and we are relying on this fix already for the trig and exponential functions. Instead of `from math import *`, we should use `from sasmodels.special import *` at the top of the template. This will define the same set of functions that are available to C models, including functions such as sas_erf, etc, constants such as M_PI and the gaussian quadrature weights for 20, 76 and 150 point quadrature. It also defines the `np` symbol in case any thing else is needed.",defect,assigned,major,SasView 4.3.0,SasView,,,,SasView Bug Fixing