Changeset 9bc4882 in sasmodels for sasmodels/kernelpy.py
- Timestamp:
- Sep 5, 2017 11:01:03 AM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 8db25bf
- Parents:
- acc6c8f (diff), 142a8e2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelpy.py
rd4c33d6 r9bc4882 9 9 from __future__ import division, print_function 10 10 11 import logging 12 11 13 import numpy as np # type: ignore 12 14 from numpy import pi, sin, cos #type: ignore … … 18 20 try: 19 21 from typing import Union, Callable 20 except :22 except ImportError: 21 23 pass 22 24 else: … … 31 33 _create_default_functions(model_info) 32 34 self.info = model_info 35 self.dtype = np.dtype('d') 33 36 34 37 def make_kernel(self, q_vectors): 38 logging.info("creating python kernel " + self.info.name) 35 39 q_input = PyInput(q_vectors, dtype=F64) 36 40 kernel = self.info.Iqxy if q_input.is_2d else self.info.Iq … … 228 232 # INVALID expression like the C models, but that is too expensive. 229 233 Iq = np.asarray(form(), 'd') 230 if np.isnan(Iq).any(): continue 234 if np.isnan(Iq).any(): 235 continue 231 236 232 237 # update value and norm … … 291 296 default_Iqxy.vectorized = True 292 297 model_info.Iqxy = default_Iqxy 293
Note: See TracChangeset
for help on using the changeset viewer.