code: def cast_scalar(method):
      
      @wraps(method)
      def new_method(self, other):
          if np.isscalar(other):
              other = type(self)([other],self.domain())
          return method(self, other)
      return new_method
docs: Cast scalars to constant interpolating objects