Difference between single and double bracket Numpy array?
<p>What is the difference between these two numpy objects?</p>

<pre><code>import numpy as np
np.array([[0,0,0,0]])
np.array([0,0,0,0])
</code></pre>

<p>When you defined an array with two brackets, what you were really doing was declaring an array with an array with 4 0's inside. Therefore, if you wanted to access the first zero you would be accessing 
<code>your_array[0][0]</code> while in the second array you would just be accessing <code>your array[0]</code>. Perhaps a better way to visualize it is </p>

<pre><code>array: [
[0,0,0,0],
]
</code></pre>

<p>vs </p>

<pre><code>array: [0,0,0,0]
</code></pre>

python numpy