Skip to content

Commit

Permalink
Merge pull request #609 from PyLops/dev
Browse files Browse the repository at this point in the history
Release v2.3.1
  • Loading branch information
mrava87 authored Aug 17, 2024
2 parents 3868bca + 0ccec8c commit 7c58f0f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
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

0 comments on commit 7c58f0f

Please sign in to comment.