El lun, 11 de oct. de 2021 a la(s) 06:50, Simon Cross (hodgestar+python...@gmail.com) escribió:
> Multiprocessing sort of added support for this via multiprocessing.Array -- > see > https://stackoverflow.com/questions/9754034/can-i-create-a-shared-multiarray-or-lists-of-lists-object-in-python-for-multipro. > I haven't looked at what multiprocessing.Array does under the hood. > > Summary of the StackOverflow answer for those who don't feel like clicking: > > mp_arr = mp.Array(c.c_double, size) > # then in each new process create a new numpy array using: > arr = np.frombuffer(mp_arr.get_obj()) Right, this is very close to what I had in mind for the "example with numpy.array" that I want to code next (as I just said in the response to Gregory, this is a series of implementations for pedagogical purposes trying to teach parallel processing). Thanks! -- . Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org.ar/ Twitter: @facundobatista _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/YTEO6B3TBD6PHWKRMP6F46P25HFN4ZU5/ Code of Conduct: http://python.org/psf/codeofconduct/