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: Return whether the given NumPy array conforms to the spec.
  
  Args:
    array: A NumPy array or a scalar. Tuples and lists will not be converted
      to a NumPy array automatically; they will cause this function to return
      false, even if a conversion to a conforming array is trivial.
  
  Returns:
    True if the array conforms to the spec, False otherwise.
docstr_tok: ["Return","whether","the","given","NumPy","array","conforms","to","the","spec",".","Args",":","array",":","A","NumPy","array","or","a","scalar",".","Tuples","and","lists","will","not","be","converted","to","a","NumPy","array","automatically",";","they","will","cause","this","function","to","return","false",",","even","if","a","conversion","to","a","conforming","array","is","trivial",".","Returns",":","True","if","the","array","conforms","to","the","spec",",","False","otherwise","."]
code: def check_array(self, array):
      """Return whether the given NumPy array conforms to the spec.
  
      Args:
        array: A NumPy array or a scalar. Tuples and lists will not be converted
          to a NumPy array automatically; they will cause this function to return
          false, even if a conversion to a conforming array is trivial.
  
      Returns:
        True if the array conforms to the spec, False otherwise.
      """
      if isinstance(array, np.ndarray):
          return self.shape == array.shape and self.dtype == array.dtype
      elif isinstance(array, numbers.Number):
          return self.shape == tuple() and self.dtype == np.dtype(
              type(array)
          )
      else:
          return False
  
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 8 for calling the ArraySpec obj's underlying member method code with example usage: obj.check_array(array) and returns: unknown, unknown, False