class_docstr: Adapter that handles NumPy and Jax numpy arrays.
class_docstr_tok: ["Adapter","that","handles","NumPy","and","Jax","numpy","arrays","."]
code: def can_handle(x, y=None):
      flat_inputs = list(flatten(x))
      if y is not None:
          flat_inputs += list(flatten(y))
  
      supported_types = (jnp.ndarray, np.ndarray)
      # if pd:
      #     supported_types = (ops.Tensor, np.ndarray, pd.Series, pd.DataFrame)
  
      def _is_array(v):
          if isinstance(v, supported_types):
              return True
          return False
  
      return all(_is_array(v) for v in flat_inputs)
  
file_path: elegy/elegy/data/array_adapter.py
imports: import math
  import typing
  from operator import itemgetter
  import jax.numpy
  import numpy
  from elegy import types
  from .data_adapter import DataAdapter
  from .utils import flatten, map_structure, pack_x_y_sample_weight
label_desc: Use image node_id 1 for calling the ArrayDataAdapter obj's underlying member method code with example usage: obj.can_handle(x, y) and returns: all, False, True