From bf8cc27501df37f5f5881e05f6f5a7b313d488ff Mon Sep 17 00:00:00 2001 From: M Shubham Achary <87593737+shubhamachary56821@users.noreply.github.com> Date: Mon, 3 Mar 2025 22:59:35 +0530 Subject: [PATCH] Update basegrid.py correction of some grammatical mistakes, rest the code is same --- src/grid/basegrid.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/grid/basegrid.py b/src/grid/basegrid.py index b90395d58..9f9906b7b 100644 --- a/src/grid/basegrid.py +++ b/src/grid/basegrid.py @@ -45,7 +45,7 @@ def __init__(self, points, weights): """ if len(points) != len(weights): raise ValueError( - "Number of points and weights does not match. \n" + "Number of points and weights do not match. \n" f"Number of points: {len(points)}, Number of weights: {len(weights)}." ) if weights.ndim != 1: @@ -99,7 +99,7 @@ def __getitem__(self, index): Parameters ---------- index : int or slice - index of slice object for selecting certain part of grid + index of slice object for selecting certain part of the grid Returns ------- @@ -135,7 +135,7 @@ def integrate(self, *value_arrays): raise ValueError("No array is given to integrate.") for i, array in enumerate(value_arrays): if not isinstance(array, np.ndarray): - raise TypeError(f"Arg {i} is {type(i)}, Need Numpy Array.") + raise TypeError(f"Arg {i} is {type(array)}, needs to be a Numpy Array.") if array.shape != (self.size,): raise ValueError(f"Arg {i} need to be of shape ({self.size},).") # return np.einsum("i, ..., i", a, ..., z) @@ -231,7 +231,7 @@ def moments( centers : ndarray(M, 3) The centers :math:`\textbf{R}_c` of the moments to compute from. func_vals : ndarray(N,) - The function :math:`f` values evaluated on all :math:`N` points on the integration + The function :math:`f` is evaluated at all :math:`N` points on the integration grid. type_mom : str The type of multipole moments: "cartesian", "pure", "radial" and "pure-radial". @@ -242,7 +242,7 @@ def moments( Returns ------- ndarray(L, M), or (ndarray(L, M), list) - Computes the moment integral of the function on the `m`\th center for all orders. + Computes the moment integral of the function at the `m`\th center for all orders. If `return_orders` is true, then this also returns a list that describes what each row/order is, e.g. for Cartesian, [(0, 0, 0), (1, 0, 0) ,...].