Changeset 40a87fa in sasmodels for sasmodels/core.py
- Timestamp:
- Aug 8, 2016 11:24:11 AM (8 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
r2547694 r40a87fa 40 40 # CRUFT: np.meshgrid requires multiple vectors 41 41 def meshgrid(*args): 42 """Allow meshgrid with a single argument""" 42 43 if len(args) > 1: 43 44 return np.meshgrid(*args) … … 63 64 """ 64 65 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 65 78 """ 66 79 if kind and kind not in KINDS: … … 88 101 elif kind == "2d" and any(p.type == 'orientation' for p in pars): 89 102 return True 90 elif kind == "1d" and a ny(p.type != 'orientation' for p in pars):103 elif kind == "1d" and all(p.type != 'orientation' for p in pars): 91 104 return True 92 105 elif kind == "magnetic" and any(p.type == 'sld' for p in pars): … … 252 265 253 266 def 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 """ 254 272 import sys 255 273 kind = sys.argv[1] if len(sys.argv) > 1 else "all"
Note: See TracChangeset
for help on using the changeset viewer.