utils
Class with helper functions.
MIT License Copyright © 2021-2022, Daniel Nagel All rights reserved.
savetxt(filename, array, fmt, submodule=None, header=None)
¶
Save ndarray with user runtime information.
Source code in src/mosaic/utils.py
45 46 47 48 49 50 51 52 53 54 55 56 |
|
load_clusters(filename)
¶
Load clusters stored from cli.
Parameters:
-
filename
(str
) –Filename of cluster file.
Returns:
-
clusters
(ndarray of shape (n_clusters, )
) –A list of arrays, each containing all indices (features) for each cluster.
Source code in src/mosaic/utils.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
save_clusters(filename, clusters)
¶
Save clusters from mosaic.Clustering.clusters_
to txt file.
Parameters:
-
filename
(str
) –Filename of cluster file.
-
clusters
(ndarray of shape (n_clusters, )
) –A list of arrays, each containing all indices (features) for each cluster.
Source code in src/mosaic/utils.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|