Skip to content

Commit

Permalink
fix: docs using the wrong array type
Browse files Browse the repository at this point in the history
  • Loading branch information
cako committed Aug 5, 2024
1 parent cfef27a commit 694e2ff
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions pylops/utils/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def get_array_module(x: npt.ArrayLike) -> ModuleType:
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.Array`
Array
Returns
Expand All @@ -143,7 +143,7 @@ def get_convolve(x: npt.ArrayLike) -> Callable:
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.Array`
Array
Returns
Expand All @@ -168,7 +168,7 @@ def get_fftconvolve(x: npt.ArrayLike) -> Callable:
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.Array`
Array
Returns
Expand All @@ -193,7 +193,7 @@ def get_oaconvolve(x: npt.ArrayLike) -> Callable:
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.Array`
Array
Returns
Expand Down Expand Up @@ -222,7 +222,7 @@ def get_correlate(x: npt.ArrayLike) -> Callable:
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.Array`
Array
Returns
Expand All @@ -247,7 +247,7 @@ def get_add_at(x: npt.ArrayLike) -> Callable:
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.Array`
Array
Returns
Expand All @@ -270,7 +270,7 @@ def get_sliding_window_view(x: npt.ArrayLike) -> Callable:
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.Array`
Array
Returns
Expand All @@ -293,7 +293,7 @@ def get_block_diag(x: npt.ArrayLike) -> Callable:
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`cupy.ndarray` or :obj:`jax.Array`
Array
Returns
Expand Down Expand Up @@ -506,21 +506,21 @@ def to_cupy_conditional(x: npt.ArrayLike, y: npt.ArrayLike) -> NDArray:
return y


def inplace_set(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> Callable:
def inplace_set(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> NDArray:
"""Perform inplace set based on input
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`jax.Array`
Array to sum
y : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
y : :obj:`numpy.ndarray` or :obj:`jax.Array`
Output array
idx : :obj:`list`
Indices to sum at
Returns
-------
y : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
y : :obj:`numpy.ndarray` or :obj:`jax.Array`
Output array
"""
Expand All @@ -532,21 +532,21 @@ def inplace_set(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> Callable:
return y


def inplace_add(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> Callable:
def inplace_add(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> NDArray:
"""Perform inplace add based on input
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`jax.Array`
Array to sum
y : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
y : :obj:`numpy.ndarray` or :obj:`jax.Array`
Output array
idx : :obj:`list`
Indices to sum at
Returns
-------
y : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
y : :obj:`numpy.ndarray` or :obj:`jax.Array`
Output array
"""
Expand All @@ -558,21 +558,21 @@ def inplace_add(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> Callable:
return y


def inplace_multiply(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> Callable:
def inplace_multiply(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> NDArray:
"""Perform inplace multiplication based on input
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`jax.Array`
Array to sum
y : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
y : :obj:`numpy.ndarray` or :obj:`jax.Array`
Output array
idx : :obj:`list`
Indices to multiply at
Returns
-------
y : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
y : :obj:`numpy.ndarray` or :obj:`jax.Array`
Output array
"""
Expand All @@ -584,21 +584,21 @@ def inplace_multiply(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> Callable:
return y


def inplace_divide(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> Callable:
def inplace_divide(x: npt.ArrayLike, y: npt.ArrayLike, idx: list) -> NDArray:
"""Perform inplace division based on input
Parameters
----------
x : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
x : :obj:`numpy.ndarray` or :obj:`jax.Array`
Array to sum
y : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
y : :obj:`numpy.ndarray` or :obj:`jax.Array`
Output array
idx : :obj:`list`
Indices to divide at
Returns
-------
y : :obj:`numpy.ndarray` or :obj:`jax.numpy.ndarray`
y : :obj:`numpy.ndarray` or :obj:`jax.Array`
Output array
"""
Expand Down

0 comments on commit 694e2ff

Please sign in to comment.