title: Scipy Sparse Random using Numpy default_rng
body: <p>I'm using the <code>scipy.sparse.random</code> function to generate random sparse matrices with <code>m,n &gt; 1000</code>, a given density and my upstream programs work:</p>
  <pre><code>import numpy
  from scipy import sparse
  from numpy.random import default_rng
  
  numpy.random.seed(41)
  S = sparse.random(m, n, density=0.25, format='csr')
  </code></pre>
  <p>However, when using the <code>numpy.random.default_rng</code> function, the upstream programs don't work:</p>
  <pre><code>rng = default_rng(seed=41)
  S = sparse.random(m, n, density=0.25, format='csr', random_state=rng)
  </code></pre>
  <p>Any ideas why this should be?</p>
  <p>See: <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.random.html" rel="nofollow noreferrer">https://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.random.html</a></p>