Skip to content
Open
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
11 changes: 10 additions & 1 deletion pytorch_wavelets/dtcwt/coeffs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@
from __future__ import absolute_import

from numpy import load
from pkg_resources import resource_stream

try:
import importlib_resources

def resource_stream(pkg_path, filename):
return importlib_resources.files(pkg_path).joinpath(filename).open("rb")

except Exception:
from pkg_resources import resource_stream

try:
import pywt
_HAVE_PYWT = True
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
numpy
torch>=1.0.0
PyWavelets>=1.0.0
importlib_resources >= 6.5 ; python_version >= "3.14"