code: def _check_scalar(value):
      '''If value is a 0-dimensional array, returns the contents of value.
         Otherwise, returns value.
      '''
      if isinstance(value, np.ndarray):
          if value.ndim == 0:
              # We have a 0-dimensional array
              return value[None][0]
      return valuf _check_scalar(value):
      '''If value is a 0-dimensional array, returns the contents of value.
         Otherwise, returns value.
      '''
      if isinstance(value, np.ndarray):
          if value.ndim == 0:
              # We have a 0-dimensional array
              return value[None][0]
      return value
docs: If value is a 0-dimensional array, returns the contents of value.
         Otherwise, returns value.