Changeset fb7c176 in sasmodels


Ignore:
Timestamp:
Sep 19, 2018 12:05:44 PM (3 months ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
beta_approx, py3, ticket-1015-gpu-mem-error, ticket-1157, ticket-608-user-defined-weights, ticket_1156
Children:
cc8b183
Parents:
db472a5
Message:

use integer for choice list with random models in sascomp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    rbd7630d rfb7c176  
    352352 
    353353    # If it is a list of choices, pick one at random with equal probability 
    354     # In practice, the model specific random generator will override. 
    355354    par = model_info.parameters[name] 
    356     if len(par.limits) > 2:  # choice list 
    357         return np.random.randint(len(par.limits)) 
     355    if par.choices:  # choice list 
     356        return np.random.randint(len(par.choices)) 
    358357 
    359358    # If it is a fixed range, pick from it with equal probability. 
Note: See TracChangeset for help on using the changeset viewer.