mtuq.GreensTensorList.parallel_map

GreensTensorList.parallel_map(function, *sequences)[source]

Version of map parallelized using mpi4py

Maps a function to each GreensTensor in the list. If one or more optional sequences are given, the function is called with an argument list consisting of the corresponding item of each sequence, similar to the Python built-in map.

Warning

Although map returns a new GreensTensorList, contents of the original GreensTensorList may still be overwritten, depending on the function. To preserve the original, consider making a copy first.