Changeset d18582e in sasmodels for sasmodels/core.py
- Timestamp:
- Feb 4, 2016 12:44:23 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 5054e80
- Parents:
- bb6f0f3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
reafc9fa rd18582e 73 73 return True 74 74 75 def load_model(model_definition, dtype= "single", platform="ocl"):75 def load_model(model_definition, dtype=None, platform="ocl"): 76 76 """ 77 77 Prepare the model for the default execution platform. … … 87 87 for the calculation. Any valid numpy single or double precision identifier 88 88 is valid, such as 'single', 'f', 'f32', or np.float32 for single, or 89 'double', 'd', 'f64' and np.float64 for double. 89 'double', 'd', 'f64' and np.float64 for double. If *None*, then use 90 'single' unless the model defines single=False. 90 91 91 92 *platform* should be "dll" to force the dll to be used for C models, … … 94 95 if isstr(model_definition): 95 96 model_definition = load_model_definition(model_definition) 97 if dtype is None: 98 dtype = 'single' if getattr(model_definition, 'single', True) else 'double' 96 99 source, info = generate.make(model_definition) 97 100 if callable(info.get('Iq', None)):
Note: See TracChangeset
for help on using the changeset viewer.