Changes in / [646eeaa:cf3d0ce] in sasmodels
- Files:
-
- 3 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
.gitignore
re9ed2de re9ed2de 8 8 *.so 9 9 *.obj 10 *.o11 10 /doc/_build/ 12 11 /doc/api/ … … 20 19 /.pydevproject 21 20 /.idea 22 .vscode23 21 /sasmodels.egg-info/ 24 22 /example/Fit_*/ -
sasmodels/modelinfo.py
r39a06c9 r39a06c9 12 12 from os.path import abspath, basename, splitext 13 13 import inspect 14 import logging15 14 16 15 import numpy as np # type: ignore 17 18 from . import autoc19 16 20 17 # Optional typing … … 35 32 TestCondition = Tuple[ParameterSetUser, TestInput, TestValue] 36 33 # pylint: enable=unused-import 37 38 logger = logging.getLogger(__name__)39 34 40 35 # If MAX_PD changes, need to change the loop macros in kernel_iq.c … … 815 810 info.profile = getattr(kernel_module, 'profile', None) # type: ignore 816 811 info.sesans = getattr(kernel_module, 'sesans', None) # type: ignore 812 # Default single and opencl to True for C models. Python models have callable Iq. 813 info.opencl = getattr(kernel_module, 'opencl', not callable(info.Iq)) 814 info.single = getattr(kernel_module, 'single', not callable(info.Iq)) 817 815 info.random = getattr(kernel_module, 'random', None) 818 816 … … 823 821 info.hidden = getattr(kernel_module, 'hidden', None) # type: ignore 824 822 823 if callable(info.Iq) and parameters.has_2d: 824 raise ValueError("oriented python models not supported") 825 825 826 info.lineno = {} 826 827 _find_source_lines(info, kernel_module) 827 if getattr(kernel_module, 'py2c', False):828 try:829 warnings = autoc.convert(info, kernel_module)830 except Exception as exc:831 warnings = [str(exc)]832 if warnings:833 warnings.append("while converting %s from C to python"%name)834 if len(warnings) > 2:835 warnings = "\n".join(warnings)836 else:837 warnings = " ".join(warnings)838 logger.warn(warnings)839 840 # Default single and opencl to True for C models. Python models have callable Iq.841 # Needs to come after autoc.convert since the Iq symbol may have been842 # converted from python to C843 info.opencl = getattr(kernel_module, 'opencl', not callable(info.Iq))844 info.single = getattr(kernel_module, 'single', not callable(info.Iq))845 846 if callable(info.Iq) and parameters.has_2d:847 raise ValueError("oriented python models not supported")848 849 828 return info 850 829
Note: See TracChangeset
for help on using the changeset viewer.