title: Multidimensional array by user input in python
body: <p>I used Jupyter notebook, I am new to Python, I try to fetch value from user in multidimensional array how I do that? I write a little code, after put first value I get error that I don't understand</p>
  
  <p>Error:</p>
  
  <blockquote>
  <pre><code>Traceback (most recent call last)
     &lt;ipython-input-64-4d8986a5e412&gt; in &lt;module&gt;
            5 for i in range(lengthrow):
            6     for j in range(lengthcol):
      ----&gt; 7         arr[i][j]=int(input("enter value"))
            8 print(arr)
  </code></pre>
    
    <p>IndexError: index 0 is out of bounds for axis 0 with size 0</p>
  </blockquote>
  
  <p>code:</p>
  
  <pre><code>from numpy import*
  arr = array([[],[]])
  lengthrow=int(input("enter array row length"))
  lengthcol=int(input("enter array col length"))
  for i in range(lengthrow):
      for j in range(lengthcol):
          arr[i][j]=int(input("enter value"))
  print(arr)
  </code></pre>