Changeset bd21b12 in sasmodels for sasmodels


Ignore:
Timestamp:
Aug 2, 2017 4:09:33 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:
8c89d06
Parents:
8f04da4
Message:

allow None for dtype, using default precision for the model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r8f04da4 rbd21b12  
    659659    model = core.build_model(model_info, dtype=dtype, platform="ocl") 
    660660    calculator = DirectModel(data, model, cutoff=cutoff) 
    661     calculator.engine = "OCL%s"%DTYPE_MAP[dtype] 
     661    calculator.engine = "OCL%s"%DTYPE_MAP[str(model.dtype)] 
    662662    return calculator 
    663663 
     
    730730    if dtype == 'sasview': 
    731731        return eval_sasview(model_info, data) 
    732     elif dtype.endswith('!'): 
     732    elif dtype is None or dtype.endswith('!'): 
     733        return eval_opencl(model_info, data, dtype=dtype, cutoff=cutoff) 
     734    else: 
    733735        return eval_ctypes(model_info, data, dtype=dtype[:-1], cutoff=cutoff) 
    734     else: 
    735         return eval_opencl(model_info, data, dtype=dtype, cutoff=cutoff) 
    736736 
    737737def _show_invalid(data, theory): 
Note: See TracChangeset for help on using the changeset viewer.