pyfibre.utilities module¶
ColECM: Collagen ExtraCellular Matrix Simulation UTILITIES ROUTINE
Created by: Frank Longford Created on: 01/11/2015
Last Modified: 12/04/2018
-
exception
pyfibre.utilities.NotSupportedError[source]¶ Bases:
Exception-
message= 'Method not supported by class'¶
-
-
pyfibre.utilities.flatten_list(list_of_lists)[source]¶ Returned a flattened version of a list of lists
-
pyfibre.utilities.label_set(labels, background=0)[source]¶ Return a unique set of non-background values in labels
-
pyfibre.utilities.log_time(message)[source]¶ Use as a decorator around a callable to automatically record elapsed time to the log. Can be personalised with an extra string message argument
Example
>>> @log_time(name='TEST') >>> def function(x, y): >>> return x * y >>> ... >>> >>> function(2, 3) 6
Will produce a log message:
>>> INFO: TOTAL TEST TIME .. s