class_docstr: Describes a numpy array or scalar shape and dtype.
  
  An `ArraySpec` allows an API to describe the arrays that it accepts or
  returns, before that array exists.
  The equivalent version describing a `tf.Tensor` is `TensorSpec`.
docstr: Construct a spec from the given array or number.
docstr_tok: ["Construct","a","spec","from","the","given","array","or","number","."]
code: def from_array(array, name=None):
      """Construct a spec from the given array or number."""
      if isinstance(array, np.ndarray):
          return ArraySpec(array.shape, array.dtype, name)
      elif isinstance(array, numbers.Number):
          return ArraySpec(tuple(), type(array), name)
      else:
          raise ValueError(
              "Array must be a np.ndarray or number. Got %r." % array
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numbers
  import gin
  import numpy
  import tensorflow
label_desc: Use image node_id 10 for calling the ArraySpec obj's underlying member method code with example usage: obj.from_array(array, name) and returns: ArraySpec, ArraySpec