Skip to content

Commit 3fd720d

Browse files
antonwolfyclaude
andcommitted
Fix parameter type annotations in scipy.linalg LU functions
Change parameter types from `{None, bool}` to `bool` for overwrite_a, check_finite, and overwrite_b parameters to match SciPy's documentation. These parameters are boolean flags that do not accept None as a valid value according to the documented API. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent a2825a1 commit 3fd720d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dpnp/scipy/linalg/_decomp_lu.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ def lu(
7777
Perform the multiplication ``P @ L`` (Default: do not permute).
7878
7979
Default: ``False``.
80-
overwrite_a : {None, bool}, optional
80+
overwrite_a : bool, optional
8181
Whether to overwrite data in `a` (may increase performance).
8282
8383
Default: ``False``.
84-
check_finite : {None, bool}, optional
84+
check_finite : bool, optional
8585
Whether to check that the input matrix contains only finite numbers.
8686
Disabling may give a performance gain, but may result in problems
8787
(crashes, non-termination) if the inputs do contain infinities or NaNs.
@@ -211,11 +211,11 @@ def lu_factor(a, overwrite_a=False, check_finite=True):
211211
----------
212212
a : (..., M, N) {dpnp.ndarray, usm_ndarray}
213213
Input array to decompose.
214-
overwrite_a : {None, bool}, optional
214+
overwrite_a : bool, optional
215215
Whether to overwrite data in `a` (may increase performance).
216216
217217
Default: ``False``.
218-
check_finite : {None, bool}, optional
218+
check_finite : bool, optional
219219
Whether to check that the input matrix contains only finite numbers.
220220
Disabling may give a performance gain, but may result in problems
221221
(crashes, non-termination) if the inputs do contain infinities or NaNs.
@@ -286,11 +286,11 @@ def lu_solve(lu_and_piv, b, trans=0, overwrite_b=False, check_finite=True):
286286
===== =================
287287
288288
Default: ``0``.
289-
overwrite_b : {None, bool}, optional
289+
overwrite_b : bool, optional
290290
Whether to overwrite data in `b` (may increase performance).
291291
292292
Default: ``False``.
293-
check_finite : {None, bool}, optional
293+
check_finite : bool, optional
294294
Whether to check that the input matrix contains only finite numbers.
295295
Disabling may give a performance gain, but may result in problems
296296
(crashes, non-termination) if the inputs do contain infinities or NaNs.

0 commit comments

Comments
 (0)