Then running the Tuto-GUDHI-ConfRegions-PersDiag-datapoints.ipynb notebook on macOSX/M1, the following error occurs in all childs:
AttributeError: Can't get attribute 'hauss_dist' on <module 'persistence_statistics'
This is due to a known problem of the multiprocessing package.
https://stackoverflow.com/questions/69493104/multiprocessing-example-giving-attributeerror-on-mac
Workaround:
- use context "fork" instead of "spawn"
context = get_context("fork")
with context.Pool(ncores) as p:
dist_vec = p.map(hauss_dist,[m]*B)
(it may not work if not in a if __name__ == "__main__": block
- use another multi-threading library