Changeset 40a87fa in sasmodels for sasmodels/core.py


Ignore:
Timestamp:
Aug 8, 2016 11:24:11 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
2472141
Parents:
2d65d51
Message:

lint and latex cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/core.py

    r2547694 r40a87fa  
    4040    # CRUFT: np.meshgrid requires multiple vectors 
    4141    def meshgrid(*args): 
     42        """Allow meshgrid with a single argument""" 
    4243        if len(args) > 1: 
    4344            return np.meshgrid(*args) 
     
    6364    """ 
    6465    Return the list of available models on the model path. 
     66 
     67    *kind* can be one of the following: 
     68 
     69        * all: all models 
     70        * py: python models only 
     71        * c: compiled models only 
     72        * single: models which support single precision 
     73        * double: models which require double precision 
     74        * 1d: models which are 1D only, or 2D using abs(q) 
     75        * 2d: models which can be 2D 
     76        * magnetic: models with an sld 
     77        * nommagnetic: models without an sld 
    6578    """ 
    6679    if kind and kind not in KINDS: 
     
    88101    elif kind == "2d" and any(p.type == 'orientation' for p in pars): 
    89102        return True 
    90     elif kind == "1d" and any(p.type != 'orientation' for p in pars): 
     103    elif kind == "1d" and all(p.type != 'orientation' for p in pars): 
    91104        return True 
    92105    elif kind == "magnetic" and any(p.type == 'sld' for p in pars): 
     
    252265 
    253266def list_models_main(): 
     267    # type: () -> None 
     268    """ 
     269    Run list_models as a main program.  See :func:`list_models` for the 
     270    kinds of models that can be requested on the command line. 
     271    """ 
    254272    import sys 
    255273    kind = sys.argv[1] if len(sys.argv) > 1 else "all" 
Note: See TracChangeset for help on using the changeset viewer.