class_docstr: Implements the Numpy backend ops for a PC auto-batching VM.
class_docstr_tok: ["Implements","the","Numpy","backend","ops","for","a","PC","auto-batching","VM","."]
docstr: Returns the first (batch) dimension of `val`.
docstr_tok: ["Returns","the","first","(","batch",")","dimension","of","`","val","`","."]
code: def batch_size(self, val, name=None):
      """Returns the first (batch) dimension of `val`."""
      del name
      if np.array(val).ndim:
          return np.array(val).shape[0]
      else:
          return 1
  
imports: import collections
  import numpy
  from tensorflow_probability.python.experimental.auto_batching import instructions
label_desc: Use image node_id 7 for calling the NumpyBackend obj's underlying member method code with example usage: obj.batch_size(val, name) and returns: np, int