From 7f3c94def69ca5e36ce228bd798023c80f90387c Mon Sep 17 00:00:00 2001 From: Carlos Cueto Date: Fri, 19 Jul 2024 09:22:41 +0100 Subject: [PATCH] Remove deprecation warning --- stride/physics/common/import_devito.py | 2 +- stride/physics/iso_acoustic/devito.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/stride/physics/common/import_devito.py b/stride/physics/common/import_devito.py index f29d95f0..043740c4 100644 --- a/stride/physics/common/import_devito.py +++ b/stride/physics/common/import_devito.py @@ -7,7 +7,7 @@ from devitopro import * # noqa: F401 from devitopro.types.enriched import (DiskHostDevice, DiskHost, DiskDevice, # noqa: F401 HostDevice, Host, Device, NoLayers) - from devitopro.types.dynamic import CompressedTimeFunction + from devitopro.types.compressed import CompressedTimeFunction pro_available = True except ImportError: diff --git a/stride/physics/iso_acoustic/devito.py b/stride/physics/iso_acoustic/devito.py index 10b480bf..6a357531 100644 --- a/stride/physics/iso_acoustic/devito.py +++ b/stride/physics/iso_acoustic/devito.py @@ -3,7 +3,6 @@ import glob import shutil import tempfile -import warnings import numpy as np import scipy.signal @@ -21,9 +20,6 @@ __all__ = ['IsoAcousticDevito'] -warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning) - - @mosaic.tessera class IsoAcousticDevito(ProblemTypeBase): """ @@ -1034,7 +1030,7 @@ def get_grad_vp(self, vp, **kwargs): if vp.transform is not None: # try to figure out if the user wants slowness by testing the provided transform try: - is_slowness = 1/vp.transform(10) == 10 + is_slowness = np.isclose(1/vp.transform(10), 10) except Exception: pass