From d0ce0f41484a5548cfa3950dbfea8f6b8c12aa45 Mon Sep 17 00:00:00 2001 From: eeshsaxena Date: Mon, 29 Jun 2026 22:42:43 +0530 Subject: [PATCH 1/2] Fix incorrect parameter names in docstrings Three docstrings documented parameter names that don't match their signatures: - NumericalIntegrand.integrate documented 'integrand' but the parameter is 'integrand_function'. - _evaluate_coeffs_on_points documented 'coeffs' but the parameter is 'coeff'. - deriv3 documented 'array' but the parameter is 'x'. --- src/grid/ngrid.py | 2 +- src/grid/ode.py | 2 +- src/grid/rtransform.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/grid/ngrid.py b/src/grid/ngrid.py index a3539e776..18e7e78f4 100644 --- a/src/grid/ngrid.py +++ b/src/grid/ngrid.py @@ -176,7 +176,7 @@ def integrate(self, integrand_function, non_vectorized=False, integration_chunk_ Parameters ---------- - integrand : callable + integrand_function : callable Integrand function to integrate. It must take a list of arguments (one for each domain) with the same dimension as the grid points used for the corresponding domain and return a float (e.g. a function of the form f([x1,y1,z1], [x2,y2,z2]) -> float). diff --git a/src/grid/ode.py b/src/grid/ode.py index a5219bd8f..9e34271be 100644 --- a/src/grid/ode.py +++ b/src/grid/ode.py @@ -512,7 +512,7 @@ def _evaluate_coeffs_on_points(x: np.ndarray, coeff: list | np.ndarray): ---------- x : ndarray(N,) Points of the independent variable/domain. - coeffs : list[callable or float] or ndarray(K + 1,) + coeff : list[callable or float] or ndarray(K + 1,) Coefficients :math:`a_k` of each term :math:`\frac{d^k y(x)}{d x^k}` ordered from 0 to K. Each coefficient can either be a callable function :math:`a_k(x)` or a constant number :math:`a_k`. diff --git a/src/grid/rtransform.py b/src/grid/rtransform.py index eb8b6dec1..a4d5cdd35 100644 --- a/src/grid/rtransform.py +++ b/src/grid/rtransform.py @@ -1957,7 +1957,7 @@ def deriv3(self, x: np.ndarray): Parameters ---------- - array: np.ndarray(N,) + x: np.ndarray(N,) One dimensional array in :math:`[-1,1]`\. Returns From cc879c525c8146b1ed5e57faebead4458a17eb98 Mon Sep 17 00:00:00 2001 From: eeshsaxena Date: Tue, 30 Jun 2026 08:43:20 +0530 Subject: [PATCH 2/2] Remove duplicate integration_chunk_size docstring entry The integrate docstring documented integration_chunk_size twice; the first entry had an incorrect default (1000 vs the signature's 6000) and appeared out of order. Keep the single correct entry. --- src/grid/ngrid.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/grid/ngrid.py b/src/grid/ngrid.py index 18e7e78f4..7104035e9 100644 --- a/src/grid/ngrid.py +++ b/src/grid/ngrid.py @@ -180,9 +180,6 @@ def integrate(self, integrand_function, non_vectorized=False, integration_chunk_ Integrand function to integrate. It must take a list of arguments (one for each domain) with the same dimension as the grid points used for the corresponding domain and return a float (e.g. a function of the form f([x1,y1,z1], [x2,y2,z2]) -> float). - integration_chunk_size : int, optional - Number of points to integrate at once. This parameter can be used to control the - memory usage of the integration. Default is 1000. non_vectorized : bool, optional Set to True if the integrand is not vectorized. Default is False. If True, the integrand will be called for each point of the grid separately without vectorization. This implies