class_docstr: Wrapper over ndarray that can contain tensors on multiple devices.
  
  This is returned by extensions.pmap, and contains the individual tensors on
  different devices.
docstr: Initializes the ShardedNdArray.
  
  Note that the tensors should be ordered in the way the pmap producing these
  tensors is run.
  
  Args:
    tensors: list or tuple of eager tensors, one for each device.
docstr_tok: ["Initializes","the","ShardedNdArray",".","Note","that","the","tensors","should","be","ordered","in","the","way","the","pmap","producing","these","tensors","is","run",".","Args",":","tensors",":","list","or","tuple","of","eager","tensors",",","one","for","each","device","."]
code: def __init__(self, tensors):
      """Initializes the ShardedNdArray.
  
      Note that the tensors should be ordered in the way the pmap producing these
      tensors is run.
  
      Args:
        tensors: list or tuple of eager tensors, one for each device.
      """
  
      if not isinstance(tensors, (list, tuple)) or not tensors:
          raise ValueError(
              "Unable to create a ShardedNdArray without a list of tensors."
          )
      self.tensors = tensors
      self.n_devices = len(tensors)
  
imports: import numpy
  import six
  import tensorflow.compat.v2
  from trax.tf_numpy.numpy_impl import dtypes
label_desc: Use image node_id 1 to create a new ShardedNdArray object from inherited base classes: object with example: obj = ShardedNdArray(tensors)