Changeset 672978c in sasmodels for sasmodels/core.py
- Timestamp:
- Aug 9, 2016 4:27:14 PM (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:
- c95dfc63, 9f60c06
- Parents:
- 3d9001f (diff), 9457498 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/core.py
r3d9001f r672978c 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: … … 87 100 elif kind == "2d" and any(p.type == 'orientation' for p in pars): 88 101 return True 89 elif kind == "1d" and a ny(p.type != 'orientation' for p in pars):102 elif kind == "1d" and all(p.type != 'orientation' for p in pars): 90 103 return True 91 104 elif kind == "magnetic" and any(p.type == 'sld' for p in pars): … … 251 264 252 265 def list_models_main(): 266 # type: () -> None 267 """ 268 Run list_models as a main program. See :func:`list_models` for the 269 kinds of models that can be requested on the command line. 270 """ 253 271 import sys 254 272 kind = sys.argv[1] if len(sys.argv) > 1 else "all"
Note: See TracChangeset
for help on using the changeset viewer.