Skip to content

AttributeError: 'numpy.random._generator.Generator' object has no attribute 'rand' #10

@SuhasSrinivasan

Description

@SuhasSrinivasan

This issue occurred when running python run_framework.py -f numpy -p L

OS: Ubuntu 20.04.4 LTS
Python: 3.7.13
numpy: 1.19.5

***** Testing NumPy with spmv on the L dataset *****
Process Process-46:
Traceback (most recent call last):
  File "/opt/miniconda3/envs/chrombpnet/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/opt/miniconda3/envs/chrombpnet/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "run_framework.py", line 18, in run_benchmark
    test.run(preset, validate, repeat, timeout)
  File "/root/npbench/npbench/infrastructure/test.py", line 66, in run
    bdata = self.bench.get_data(preset)
  File "/root/npbench/npbench/infrastructure/benchmark.py", line 68, in get_data
    exec(init_str, data)
  File "<string>", line 1, in <module>
  File "/root/npbench/npbench/benchmarks/spmv/spmv.py", line 19, in initialize
    random_state=rng)
  File "/opt/miniconda3/envs/chrombpnet/lib/python3.7/site-packages/scipy/sparse/construct.py", line 786, in random
    data_rvs = random_state.rand
AttributeError: 'numpy.random._generator.Generator' object has no attribute 'rand'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions