spux.utils package¶
Submodules¶
spux.utils.annotate module¶
-
spux.utils.annotate.
annotate
(data, labels, time, auxiliary=None)[source]¶ Annotate data array with the given labels (with an option for auxiliary information).
Optional auxiliary object of any type can be provided and will be passed to the error model, but will not be stored in the corresponding ‘info’ as the model prediction, and hence will be node-local. In the error model, the ‘prediction’ will then be a dictionary of the form: {‘scalars’ : predictions, ‘auxiliary’ : auxiliary}. This is useful for large non-scalar model outputs, such as vectors or multi-dimensional arrays (e.g. xarray’s). Any additional (i.e outside the error model) access of such auxiliary information is not supported. As such data is often very large, the recommended option is to keep the trace of all sandboxes and perform additional a posteriori post-processing.
spux.utils.assign module¶
spux.utils.debug_inparallel module¶
spux.utils.environment module¶
spux.utils.evaluations module¶
spux.utils.progress module¶
spux.utils.sandbox module¶
spux.utils.seed module¶
spux.utils.serialize module¶
spux.utils.setup module¶
spux.utils.shell module¶
-
spux.utils.shell.
execute
(command, directory=None, verbosity=1, executable=None)[source]¶ Execute an application command (including any arguments) in a command line shell.
- Parameter verbosity:
- 0 - no output to the console 1 - print only error messages (default) 2 - prints the command being executed and the result
Returns (process returncode, standard output, error output)
spux.utils.synthesize module¶
spux.utils.testing module¶
spux.utils.timer module¶
spux.utils.timing module¶
spux.utils.transforms module¶
-
spux.utils.transforms.
logmeanstd
(logm, logs)[source]¶ Return the needed quantities to construct stats.lognorm with a specified mean (logm) and standard deviation (logs).
According to documentation at: https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.lognorm.html
-
spux.utils.transforms.
numpify
(dictionary)[source]¶ Convert dict with integer keys to numpy array - assume user plays nice.