code: def test_basic_flow(self, array_type):
      x = self.make_array(array_type, (34, 4))
      y = self.make_array(array_type, (34, 2))
  
      adapter = array_data_adapter.ArrayDataAdapter(
          x,
          y=y,
          sample_weight=None,
          batch_size=16,
          steps=None,
          shuffle=False,
      )
      self.assertEqual(adapter.num_batches, 3)
      self.assertEqual(adapter.batch_size, 16)
      self.assertEqual(adapter.has_partial_batch, True)
      self.assertEqual(adapter.partial_batch_size, 2)
  
      gen = adapter.get_numpy_iterator()
      for i, batch in enumerate(gen):
          self.assertEqual(len(batch), 2)
          bx, by = batch
          self.assertIsInstance(bx, np.ndarray)
          self.assertIsInstance(by, np.ndarray)
          self.assertEqual(bx.dtype, by.dtype)
          self.assertEqual(bx.dtype, backend.floatx())
          if i < 2:
              self.assertEqual(bx.shape, (16, 4))
              self.assertEqual(by.shape, (16, 2))
          else:
              self.assertEqual(bx.shape, (2, 4))
              self.assertEqual(by.shape, (2, 2))
      ds = adapter.get_tf_dataset()
      for i, batch in enumerate(ds):
          self.assertEqual(len(batch), 2)
          bx, by = batch
          self.assertIsInstance(bx, tf.Tensor)
          self.assertIsInstance(by, tf.Tensor)
          self.assertEqual(bx.dtype, by.dtype)
          self.assertEqual(bx.dtype, backend.floatx())
          if i < 2:
              self.assertEqual(tuple(bx.shape), (16, 4))
              self.assertEqual(tuple(by.shape), (16, 2))
          else:
              self.assertEqual(tuple(bx.shape), (2, 4))
              self.assertEqual(tuple(by.shape), (2, 2))
  
file_path: keras/keras/trainers/data_adapters/array_data_adapter_test.py
imports: import numpy
  import pandas
  import pytest
  import tensorflow
  from absl.testing import parameterized
  from keras import backend
  from keras import testing
  from keras.trainers.data_adapters import array_data_adapter
label_desc: Use image node_id 2 for calling the TestArrayDataAdapter obj's underlying member method code with example usage: obj.test_basic_flow(array_type) without return types