pyfibre.io.utilities module¶
-
pyfibre.io.utilities.check_file_name(file_name, file_type="", extension="")[source]¶ Checks file_name for file_type or extension. If present, returns amended file_name without extension or file_type
-
pyfibre.io.utilities.check_string(string, pos, sep, word)[source]¶ Checks index ‘pos’ of ‘string’ seperated by ‘sep’ for substring ‘word’ If present, removes ‘word’ and returns amended string
-
pyfibre.io.utilities.deserialize_networkx_graph(data)[source]¶ Transform JSON serialised data into a networkx Graph object
-
pyfibre.io.utilities.get_file_names(prefix)[source]¶ Return set of paths determined from file prefix
-
pyfibre.io.utilities.numpy_to_python_recursive(dictionary)[source]¶ Convert all numpy values in nested dictionary to pure python values
-
pyfibre.io.utilities.parse_file_path(file_path, key=None)[source]¶ Parse input path in order to extract all files
-
pyfibre.io.utilities.pop_dunder_recursive(dictionary)[source]¶ Recursively removes all dunder keys from a nested dictionary.
-
pyfibre.io.utilities.pop_recursive(dictionary, pop_func)[source]¶ Recursively remove a named key from dictionary and any contained dictionaries.
-
pyfibre.io.utilities.pop_under_recursive(dictionary)[source]¶ Recursively removes all under keys from a nested dictionary.
-
pyfibre.io.utilities.python_to_numpy_recursive(dictionary)[source]¶ Convert all numpy values in nested dictionary to pure python values
-
pyfibre.io.utilities.remove_contraction(dictionary)[source]¶ Remove any keys from nested dictionary beginning with the word contraction
-
pyfibre.io.utilities.remove_dunder(dictionary)[source]¶ Remove any keys from dictionary beginning with an double underscore
-
pyfibre.io.utilities.remove_under(dictionary)[source]¶ Remove any keys from dictionary beginning with an underscore