<p dir="auto">In SciPy 1.3.0, it appears that selecting a value from a CSR sparse matrix (unsure if other sparse matrices are affected) now returns a 0-D array; whereas, in SciPy 1.2 (and before) it returned a scalar. Below is an example of this behavior.</p>
<h3 dir="auto">Reproducing code example:</h3>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import numpy as np

In [2]: import scipy.sparse as sp

In [3]: x = np.array([1, 2, 3])

In [4]: spx = sp.csr_matrix(x)

In [5]: spx[0, 0]  # previously returned a scalar
Out[5]: array(1)"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>

<span class="pl-v">In</span> [<span class="pl-c1">2</span>]: <span class="pl-s1">import</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">sparse</span> <span class="pl-k">as</span> <span class="pl-s1">sp</span>

<span class="pl-v">In</span> [<span class="pl-c1">3</span>]: <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>])

<span class="pl-v">In</span> [<span class="pl-c1">4</span>]: <span class="pl-s1">spx</span> <span class="pl-c1">=</span> <span class="pl-s1">sp</span>.<span class="pl-en">csr_matrix</span>(<span class="pl-s1">x</span>)

<span class="pl-v">In</span> [<span class="pl-c1">5</span>]: <span class="pl-s1">spx</span>[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>]  <span class="pl-c"># previously returned a scalar</span>
<span class="pl-v">Out</span>[<span class="pl-c1">5</span>]: <span class="pl-en">array</span>(<span class="pl-c1">1</span>)</pre></div>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>

<p dir="auto">SciPy 1.3.0<br>
NumPy 1.16.4</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/stuartarchibald/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/stuartarchibald">@stuartarchibald</a></p>
<p dir="auto">Indexing csr or csc sparce matrix return an array of one element with scipy 1.3, With previous version it returned a scalar. I believe it is an oversight since lil_matrix indexing still return a scalar.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import scipy
import numpy as np
print(type(scipy.sparse.csr_matrix(np.eye(3))[0,0]))
print(type(scipy.sparse.csc_matrix(np.eye(3))[0,0]))
print(type(scipy.sparse.lil_matrix(np.eye(3))[0,0]))"><pre class="notranslate"><code class="notranslate">import scipy
import numpy as np
print(type(scipy.sparse.csr_matrix(np.eye(3))[0,0]))
print(type(scipy.sparse.csc_matrix(np.eye(3))[0,0]))
print(type(scipy.sparse.lil_matrix(np.eye(3))[0,0]))
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;class 'numpy.ndarray'&gt;
&lt;class 'numpy.ndarray'&gt;
&lt;class 'numpy.float64'&gt;"><pre class="notranslate"><code class="notranslate">&lt;class 'numpy.ndarray'&gt;
&lt;class 'numpy.ndarray'&gt;
&lt;class 'numpy.float64'&gt;
</code></pre></div>
<h3 dir="auto">Scipy/Numpy/Python version information:</h3>
<p dir="auto">scipy 1.3.0<br>
numpy 1.16.3<br>
python 3.7.0</p>