parcels icon indicating copy to clipboard operation
parcels copied to clipboard

numpy random randint

Open lucvandenbulcke opened this issue 7 months ago • 4 comments

I'm trying to use MPI to speed up a simulation. I'm using Python 3.12 and Parcels 3.0

The simulations halts with the error: File ".../envs/parcels/lib/python3.12/site-packages/parcels/particledata.py", line 40, in partitionParticlesMPI_default mpiProcs = np.randint(0, mpi_size, size=coords.shape[0]) ^^^^^^^^^^ AttributeError: module 'numpy' has no attribute 'randint'. Did you mean: 'gradient'?

In particledata.py, I replaced np.randint(...) with np.random.randint(...), which made it work

lucvandenbulcke avatar Jun 28 '24 12:06 lucvandenbulcke