code: def compare_arrays(left, right):
      "Eq check with a short-circuit for identical objects."
      return (
          left is right
          or ((left.shape == right.shape) and (left == right).all())
      f compare_arrays(left, right):
      "Eq check with a short-circuit for identical objects."
      return (
          left is right
          or ((left.shape == right.shape) and (left == right).all())
      )
docs: Eq check with a short-circuit for identical objects.