Changeset b139ee6 in sasmodels


Ignore:
Timestamp:
Jul 26, 2017 10:04:00 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
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
Message:

create log entry when python model is loaded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernelpy.py

    rdbfd471 rb139ee6  
    99from __future__ import division, print_function 
    1010 
     11import logging 
     12 
    1113import numpy as np  # type: ignore 
    1214from numpy import pi, sin, cos  #type: ignore 
     
    1820try: 
    1921    from typing import Union, Callable 
    20 except: 
     22except ImportError: 
    2123    pass 
    2224else: 
     
    3335 
    3436    def make_kernel(self, q_vectors): 
     37        logging.info("creating python kernel " + self.info.name) 
    3538        q_input = PyInput(q_vectors, dtype=F64) 
    3639        kernel = self.info.Iqxy if q_input.is_2d else self.info.Iq 
     
    236239            # INVALID expression like the C models, but that is too expensive. 
    237240            Iq = np.asarray(form(), 'd') 
    238             if np.isnan(Iq).any(): continue 
     241            if np.isnan(Iq).any(): 
     242                continue 
    239243 
    240244            # update value and norm 
     
    300304        default_Iqxy.vectorized = True 
    301305        model_info.Iqxy = default_Iqxy 
    302  
Note: See TracChangeset for help on using the changeset viewer.