Blosc/python-blosc2

Replace legacy `np.random.normal`

Closed this issue · 1 comments

Ruff issue in notebooks:

doc/getting_started/tutorials/02.ndarray-basics.ipynb:cell 32:1:16: NPY002 Replace legacy `np.random.normal` call with `np.random.Generator`
  |
1 | buffer = bytes(np.random.normal(0, 1, np.prod(shape)) * 8)
  |                ^^^^^^^^^^^^^^^^ NPY002
2 | b2ndarray = blosc2.frombuffer(buffer, shape, dtype=dtype)
3 | print("Compression ratio:", b2ndarray.schunk.cratio)
  |

Can you provide a PR please?