title: Confusion about numpy's apply along axis and list comprehensions
body: <p>Alright, so I apologize ahead of time if I'm just asking something silly, but I really thought I understood how <code>apply_along_axis</code> worked. I just ran into something that might be an edge case that I just didn't consider, but it's baffling me. In short, this is the code that is confusing me:</p>
  
  <pre><code>class Leaf(object):
  
      def __init__(self, location):
          self.location = location
  
      def __len__(self):
          return self.location.shape[0]
  
  def bulk_leaves(child_array, axis=0):
      test = np.array([Leaf(location) for location in child_array])  # This is what I want
      check = np.apply_along_axis(Leaf, 0, child_array)  # This returns an array of individual leafs with the same shape as child_array
      return test, check
  
  if __name__ == "__main__":
      test, check = bulk_leaves(np.random.ran(100, 50))
      test == check  # False
  </code></pre>
  
  <p>I always feel silly using a list comprehension with numpy and then casting back to an array, but I'm just nor sure of another way to do this. Am I just missing something obvious?</p>