MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / preprocess

Function preprocess

graphs/frequent_pattern_graph_miner.py:209–220  ·  view source on GitHub ↗

Preprocess the edge array >>> preprocess([['ab-e1', 'ac-e3', 'ad-e5', 'bc-e4', 'bd-e2', 'be-e6', 'bh-e12', ... 'cd-e2', 'ce-e4', 'de-e1', 'df-e8', 'dg-e5', 'dh-e10', 'ef-e3', ... 'eg-e2', 'fg-e6', 'gh-e6', 'hi-e3']])

(edge_array)

Source from the content-addressed store, hash-verified

207
208
209def preprocess(edge_array):
210 """
211 Preprocess the edge array
212 >>> preprocess([['ab-e1', 'ac-e3', 'ad-e5', 'bc-e4', 'bd-e2', 'be-e6', 'bh-e12',
213 ... 'cd-e2', 'ce-e4', 'de-e1', 'df-e8', 'dg-e5', 'dh-e10', 'ef-e3',
214 ... 'eg-e2', 'fg-e6', 'gh-e6', 'hi-e3']])
215
216 """
217 for i in range(len(edge_array)):
218 for j in range(len(edge_array[i])):
219 t = edge_array[i][j].split("-")
220 edge_array[i][j] = t
221
222
223if __name__ == "__main__":

Callers 1

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected