title: ValueError :Setting an array element with a sequence using numpy
body: <p>I have this piece of code in python </p>
  
  <pre><code>data = np.empty(temp.shape)
  maxlat = temp.shape[0]
  maxlon = temp.shape[1]
  print(maxlat,maxlon)
  
  for i in range(0,maxlat) :
      for j in range(0,maxlon):
          data[i][j] = p_temperature(pr,temp[i][j])
  </code></pre>
  
  <p>When I run this code in Python 3.5, I get this error</p>
  
  <pre><code>ValueError : setting an array element with a sequence
  </code></pre>
  
  <p>The value of <code>maxlat</code> is <code>181</code> and the value of <code>maxlon</code> is <code>360</code>.</p>
  
  <p>The shape of <code>temp</code> array is <code>(181,360)</code></p>
  
  <p>I also tried the suggestion in the comments:</p>
  
  <pre><code>for i in range(0,maxlat) :
      for j in range(0,maxlon):
          data[i][j] = temp[i][j]
  </code></pre>
  
  <p>But I get the same error.</p>