code: def _is_zero(x):
      
      if x is None:
          return True
      if isinstance(x, numbers.Number):
          return x == 0.0
      if isinstance(x, np.ndarray):
          return np.all(x == 0)
      return False
docs: Returns True if x is numerically 0 or an array with 0's.