code: def test_array_of_different_depths(self):
      # When multiple arrays (or array-likes) are included in a
      # sequences and have different depth, we currently discover
      # as many dimensions as they share. (see also gh-17224)
      arr = np.zeros((3, 2))
      mismatch_first_dim = np.zeros((1, 2))
      mismatch_second_dim = np.zeros((3, 3))
  
      dtype, shape = ncu._discover_array_parameters(
          [arr, mismatch_second_dim], dtype=np.dtype("O")
      )
      assert shape == (2, 3)
  
      dtype, shape = ncu._discover_array_parameters(
          [arr, mismatch_first_dim], dtype=np.dtype("O")
      )
      assert shape == (2,)
      # The second case is currently supported because the arrays
      # can be stored as objects:
      res = np.asarray([arr, mismatch_first_dim], dtype=np.dtype("O"))
      assert res[0] is arr
      assert res[1] is mismatch_first_dim
  
imports: from itertools import permutations, product
  import pytest
  from pytest import param
  import numpy
  import numpy._core._multiarray_umath
  from numpy._core._rational_tests import rational
  from numpy.testing import assert_array_equal, assert_warns, IS_PYPY
label_desc: Use image node_id 6 for calling the TestNested obj's underlying member method code with example usage: obj.test_array_of_different_depths() without return types