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

Release v2.3.1 #609

Merged
merged 5 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
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
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
=========

# 2.3.1
* Fixed bug in :py:mod:`pylops.utils.backend` (see [Issue #606](https://github.com/PyLops/pylops/issues/606))

# 2.3.0

* Added `pylops.JaxOperator`, `pylops.signalprocessing.DWTND`, and `pylops.signalprocessing.DTCWT` operators.
Expand All @@ -20,9 +23,9 @@ Changelog
* Removed `cusignal` as optional dependency and `cupy`'s equivalent methods (since the library
is now unmantained and merged into `cupy`).
* Fixed ImportError of optional dependencies when installed but not correctly functioning (see [Issue #548](https://github.com/PyLops/pylops/issues/548))
* Fixed bug in :py:func:`pylops.utils.deps.to_cupy_conditional` (see [Issue #579](https://github.com/PyLops/pylops/issues/579))
* Fixed bug in the definition of `nttot` in :py:class:`pylops.waveeqprocessing.BlendingContinuous`
* Fixed bug in :py:func:`pylops.utils.signalprocessing.dip_estimate` (see [Issue #572](https://github.com/PyLops/pylops/issues/572))
* Fixed bug in `pylops.utils.deps.to_cupy_conditional` (see [Issue #579](https://github.com/PyLops/pylops/issues/579))
* Fixed bug in the definition of `nttot` in `pylops.waveeqprocessing.BlendingContinuous`
* Fixed bug in `pylops.utils.signalprocessing.dip_estimate` (see [Issue #572](https://github.com/PyLops/pylops/issues/572))


# 2.2.0
Expand Down
9 changes: 9 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
Changelog
=========


Version 2.3.1
-------------

*Released on: 17/08/2024*

* Fixed bug in :py:mod:`pylops.utils.backend` (see https://github.com/PyLops/pylops/issues/606)


Version 2.3.0
-------------

Expand Down
14 changes: 7 additions & 7 deletions pylops/utils/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_array_module(x: npt.ArrayLike) -> ModuleType:

"""
if deps.cupy_enabled or deps.jax_enabled:
if isinstance(x, jnp.ndarray):
if deps.jax_enabled and isinstance(x, jnp.ndarray):
return jnp
elif deps.cupy_enabled:
return cp.get_array_module(x)
Expand All @@ -153,7 +153,7 @@ def get_convolve(x: npt.ArrayLike) -> Callable:

"""
if deps.cupy_enabled or deps.jax_enabled:
if isinstance(x, jnp.ndarray):
if deps.jax_enabled and isinstance(x, jnp.ndarray):
return j_convolve
elif deps.cupy_enabled and cp.get_array_module(x) == cp:
return cp_convolve
Expand All @@ -178,7 +178,7 @@ def get_fftconvolve(x: npt.ArrayLike) -> Callable:

"""
if deps.cupy_enabled or deps.jax_enabled:
if isinstance(x, jnp.ndarray):
if deps.jax_enabled and isinstance(x, jnp.ndarray):
return j_fftconvolve
elif deps.cupy_enabled and cp.get_array_module(x) == cp:
return cp_fftconvolve
Expand All @@ -203,7 +203,7 @@ def get_oaconvolve(x: npt.ArrayLike) -> Callable:

"""
if deps.cupy_enabled or deps.jax_enabled:
if isinstance(x, jnp.ndarray):
if deps.jax_enabled and isinstance(x, jnp.ndarray):
raise NotImplementedError(
"oaconvolve not implemented in "
"jax. Consider using a different"
Expand Down Expand Up @@ -232,7 +232,7 @@ def get_correlate(x: npt.ArrayLike) -> Callable:

"""
if deps.cupy_enabled or deps.jax_enabled:
if isinstance(x, jnp.ndarray):
if deps.jax_enabled and isinstance(x, jnp.ndarray):
return jax.scipy.signal.correlate
elif deps.cupy_enabled and cp.get_array_module(x) == cp:
return cp_correlate
Expand Down Expand Up @@ -303,7 +303,7 @@ def get_block_diag(x: npt.ArrayLike) -> Callable:

"""
if deps.cupy_enabled or deps.jax_enabled:
if isinstance(x, jnp.ndarray):
if deps.jax_enabled and isinstance(x, jnp.ndarray):
return jnp_block_diag
elif deps.cupy_enabled and cp.get_array_module(x) == cp:
return cp_block_diag
Expand All @@ -328,7 +328,7 @@ def get_toeplitz(x: npt.ArrayLike) -> Callable:

"""
if deps.cupy_enabled or deps.jax_enabled:
if isinstance(x, jnp.ndarray):
if deps.jax_enabled and isinstance(x, jnp.ndarray):
return jnp_toeplitz
elif deps.cupy_enabled and cp.get_array_module(x) == cp:
return cp_toeplitz
Expand Down