(self, f, center, radius, dot=np.dot)
return area(radius) * dot(frr, self.weights)
Quadrature where `f` is defined in Cartesian coordinates.
Quadrature where `f` is defined in Cartesian coordinates.
Quadrature where f is defined in Cartesian coordinates .
def integrate(self, f, center, radius, dot=np.dot):
        """Quadrature where `f` is defined in Cartesian coordinates."""
        center = np.asarray(center)
        rr = (self.points.T * radius + center).T
        frr = f(rr)
        if frr.shape[-len(rr.shape[1:]) :] != rr.shape[1:]:
            string = ", ".join(str(val) for val in rr.shape[1:])
            raise QuadpyError(
                f"Wrong return value shape {frr.shape}. Expected (..., {string})."
            )
        return area(radius) * dot(frr, self.weights)
def integrate ( self , f , center , radius , dot = np . dot ) : center = np . asarray ( center ) rr = ( self . points . T * radius + center ) . T frr = f ( rr ) if frr . shape [ - len ( rr . shape [ 1 : ] ) : ] != rr . shape [ 1 : ] : string = ", " . join ( str ( val ) for val in rr . shape [ 1 : ] ) raise QuadpyError ( f"Wrong return value shape {frr.shape}. Expected (..., {string})." ) return area ( radius ) * dot ( frr , self . weights )