Skip to content

numpy random randint #1594

@lucvandenbulcke

Description

@lucvandenbulcke

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions