title: Why can't I divide (or multiply) a numpy array of arrays by a scalar?
body: <p>I am working on my first agent-based model (abm) in my life and I have to do operations on an array of arrays. Each agent of my model is an array with numbers that are added by the algorithm when certain conditions are met. Sometimes I have to divide or multiply all arrays by the same number. I saw in numpy array I can do this:</p>
  <pre><code>vector = np.array([1, 2.1, 3])
  </code></pre>
  <p>when I do</p>
  <pre><code>2 / vector
  </code></pre>
  <p>gives me, as expected,  <code>array([ 2.        ,  0.95238095,  0.66666667])</code>.</p>
  <p>But if I want an array of arrays like for example</p>
  <pre><code>arrayofarrays = np.array([[1,2,3],[1.1,6],[1]])
  </code></pre>
  <p>it has by default <code>dtype=object</code> and I guess it is this that doesn't allow me to do</p>
  <pre><code>2 / arrayofarrays
  </code></pre>
  <p>which gives</p>
  <pre><code>unsupported operand type(s) for /: 'int' and 'list'
  </code></pre>
  <p>Also</p>
  <pre><code>2 / arrayofarrays[0]
  </code></pre>
  <p>gives same error.
  Instead if you use a single array's value, as</p>
  <pre><code>2/arrayofarrays[0][1]
  </code></pre>
  <p>it works: <code>1.0</code>.</p>
  <p>Can you help me? Thanks</p>