Changeset ccd5f01 in sasmodels


Ignore:
Timestamp:
Dec 2, 2016 3:58:10 PM (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:
3a45c2c
Parents:
fe25eda
Message:

Use NaN rather than empty list if value is outside valid range

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/details.py

    r6dc78e4 rccd5f01  
    230230    npars = kernel.info.parameters.npars 
    231231    nvalues = kernel.info.parameters.nvalues 
    232     scalars = [v[0][0] for v in pairs] 
     232    scalars = [(v[0] if len(v) else np.NaN) for v, w in pairs] 
    233233    values, weights = zip(*pairs[2:npars+2]) if npars else ((),()) 
    234234    length = np.array([len(w) for w in weights]) 
Note: See TracChangeset for help on using the changeset viewer.