Changeset b139ee6 in sasmodels
- Timestamp:
- Jul 26, 2017 12:04:00 PM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- d1ff3a5
- Parents:
- 724257c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernelpy.py
rdbfd471 rb139ee6 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: … … 33 35 34 36 def make_kernel(self, q_vectors): 37 logging.info("creating python kernel " + self.info.name) 35 38 q_input = PyInput(q_vectors, dtype=F64) 36 39 kernel = self.info.Iqxy if q_input.is_2d else self.info.Iq … … 236 239 # INVALID expression like the C models, but that is too expensive. 237 240 Iq = np.asarray(form(), 'd') 238 if np.isnan(Iq).any(): continue 241 if np.isnan(Iq).any(): 242 continue 239 243 240 244 # update value and norm … … 300 304 default_Iqxy.vectorized = True 301 305 model_info.Iqxy = default_Iqxy 302
Note: See TracChangeset
for help on using the changeset viewer.