title: python jagged array operation efficiency
body: <p>I am new to Python and I am looking for the most efficient way to do operations with a jagged array.</p>
  
  <p>I have a jagged array like this:</p>
  
  <pre><code>A = array([[array([1, 2, 3]), array([4, 5])],[array([6, 7, 8, 9]), array([10])]], dtype=object)
  </code></pre>
  
  <p>I want to be able to do things like this:</p>
  
  <pre><code>A=A[A&gt;4]
  B=A+A
  </code></pre>
  
  <p>Apparently python is very efficient for doing operations like this with numpy arrays, but unfortunetely I need to do this for jagged arrays and I havent found such an object in Python. Does it exist in Python, or is there a library that allows to do efficient operations with jagged arrays ?</p>
  
  <p>For the example I gave, here are the outputs I'd like:</p>
  
  <pre><code>A = array([[array([]), array([5])],[array([6, 7, 8, 9]), array([10])]], dtype=object)
  B = array([[array([]), array([10])],[array([12, 14, 16, 18]), array([20])]], dtype=object)
  </code></pre>
  
  <p>But maybe the way Python works it simply cannot do efficient operations with jagged arrays like it does with numpy arrays, I dont know the details. </p>