flatspin.utils
Utilities related to the flatspin model
Module Contents
Functions
|
|
|
|
|
|
|
Try to eval(s), on failure return s |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Split params belonging to the given list of classes. |
|
|
|
|
|
|
|
|
|
- flatspin.utils.numeric_dict(d)
- flatspin.utils.filter_dict(d, keys)
- flatspin.utils.pop_dict(d, keys)
- flatspin.utils.try_eval(s)
Try to eval(s), on failure return s
- flatspin.utils.eval_dict(d, ctx=None)
- flatspin.utils.make_tuple(tup)
- flatspin.utils.unique_list(l)
- flatspin.utils.get_default_args(func, exclude=['self'])
- flatspin.utils.get_default_kwargs(func, exclude=[])
- flatspin.utils.get_default_params(cls)
- flatspin.utils.check_params(params, classes)
- flatspin.utils.filter_params(cls, params)
- flatspin.utils.pop_params(cls, params)
- flatspin.utils.split_params(params, classes)
Split params belonging to the given list of classes.
Returns a list of parameters matching the the given list of classes. The last element of the list are parameters which didn’t match any of the class signatures.
- flatspin.utils.format_label(label)
- flatspin.utils.label_columns(labels, prefix='spin')
- flatspin.utils.label_columns_2d(labels, prefix='spin')
- flatspin.utils.get_outdir(script_filename)
- flatspin.utils.make_outdir(script_filename)