Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update basegrid.py #271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/grid/basegrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
-------
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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".
Expand All @@ -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) ,...].

Expand Down