Accepting request 662933 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/662933 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-PyWavelets?expand=0&rev=4
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce36e2f0648ea1781490b09515363f1f64446b0eac524603e5db5e180113bed9
|
||||
size 4430706
|
||||
3
PyWavelets-1.0.1.tar.gz
Normal file
3
PyWavelets-1.0.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3c5cece36d4e17d395be6e9ac6b80ce7b774a1f71c251756c6163e63b6d878dc
|
||||
size 4544487
|
||||
@@ -1,72 +0,0 @@
|
||||
From 91b0a7bdbdd181bfb765246a9ec949b1cf2d12ad Mon Sep 17 00:00:00 2001
|
||||
From: "Gregory R. Lee" <grlee77@gmail.com>
|
||||
Date: Sat, 10 Dec 2016 03:23:39 -0500
|
||||
Subject: [PATCH] MAINT: add default to switch statement for
|
||||
is_discrete_wavelet
|
||||
|
||||
on the Cython side, raise an error if is_discrete_wavelet returns -1
|
||||
---
|
||||
pywt/_extensions/_pywt.pyx | 15 ++++++++++++---
|
||||
pywt/_extensions/c/wavelets.c | 2 ++
|
||||
2 files changed, 14 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/pywt/_extensions/_pywt.pyx b/pywt/_extensions/_pywt.pyx
|
||||
index 5928d9e7..c9b10a1f 100644
|
||||
--- a/pywt/_extensions/_pywt.pyx
|
||||
+++ b/pywt/_extensions/_pywt.pyx
|
||||
@@ -33,6 +33,15 @@ _attr_deprecation_msg = ('{old} has been renamed to {new} and will '
|
||||
'of pywt.')
|
||||
|
||||
|
||||
+# raises exception if the wavelet name is undefined
|
||||
+cdef int is_discrete_wav(WAVELET_NAME name):
|
||||
+ cdef int is_discrete
|
||||
+ discrete = wavelet.is_discrete_wavelet(name)
|
||||
+ if discrete == -1:
|
||||
+ raise ValueError("unrecognized wavelet family name")
|
||||
+ return discrete
|
||||
+
|
||||
+
|
||||
class _Modes(object):
|
||||
"""
|
||||
Because the most common and practical way of representing digital signals
|
||||
@@ -206,7 +215,7 @@ def wavelist(family=None, kind='all'):
|
||||
return True
|
||||
|
||||
family_code, family_number = wname_to_code(name)
|
||||
- is_discrete = wavelet.is_discrete_wavelet(family_code)
|
||||
+ is_discrete = is_discrete_wav(family_code)
|
||||
if kind == 'discrete':
|
||||
return is_discrete
|
||||
else:
|
||||
@@ -299,7 +308,7 @@ def DiscreteContinuousWavelet(name=u"", object filter_bank=None):
|
||||
if filter_bank is None:
|
||||
name = name.lower()
|
||||
family_code, family_number = wname_to_code(name)
|
||||
- if (wavelet.is_discrete_wavelet(family_code)):
|
||||
+ if is_discrete_wav(family_code):
|
||||
return Wavelet(name, filter_bank)
|
||||
else:
|
||||
return ContinuousWavelet(name)
|
||||
@@ -334,7 +343,7 @@ cdef public class Wavelet [type WaveletType, object WaveletObject]:
|
||||
# builtin wavelet
|
||||
self.name = name.lower()
|
||||
family_code, family_number = wname_to_code(self.name)
|
||||
- if (wavelet.is_discrete_wavelet(family_code)):
|
||||
+ if is_discrete_wav(family_code):
|
||||
self.w = <wavelet.DiscreteWavelet*> wavelet.discrete_wavelet(family_code, family_number)
|
||||
if self.w is NULL:
|
||||
raise ValueError("Invalid wavelet name.")
|
||||
diff --git a/pywt/_extensions/c/wavelets.c b/pywt/_extensions/c/wavelets.c
|
||||
index bc783af4..21b4c672 100644
|
||||
--- a/pywt/_extensions/c/wavelets.c
|
||||
+++ b/pywt/_extensions/c/wavelets.c
|
||||
@@ -42,6 +42,8 @@ int is_discrete_wavelet(WAVELET_NAME name)
|
||||
return 0;
|
||||
case CMOR:
|
||||
return 0;
|
||||
+ default:
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,3 +1,62 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 4 17:31:38 UTC 2019 - Todd R <toddrme2178@gmail.com>
|
||||
|
||||
- Update to version 1.0.1
|
||||
* Key-based assignment of coefficients to a ``FswavedecnResult`` object (i.e. via
|
||||
its __setitem__ method) has been fixed.
|
||||
* The order that the individual subband coefficients were stacked by the
|
||||
function ``pywt.ravel_coeffs`` is now guaranteed to be consistent across all
|
||||
supported Python versions. Explicit alphabetic ordering of subband coefficient
|
||||
names is used for consitent ordering regardless of Python version
|
||||
- Update to version 1.0.0
|
||||
+ New features
|
||||
* New 1D test signals
|
||||
* C99 complex support
|
||||
* complex-valued CWT
|
||||
* More flexible specification of some continuous wavelets
|
||||
* Fully Separable Discrete Wavelet Transfrom
|
||||
* New thresholding methods
|
||||
* New anti-symmetric boundary modes
|
||||
* New functions to ravel and unravel wavedecn coefficients
|
||||
* New functions to determine multilevel DWT coefficient shapes and sizes
|
||||
+ Deprecated features
|
||||
* The continous wavelets with names ``"cmor"``, ``"shan"`` and ``"fbsp"``
|
||||
should now be modified to include formerly hard-coded attributes such as their
|
||||
center frequency and bandwidth. Use of the bare names "cmor". "shan" and
|
||||
"fbsp" is now deprecated. For "cmor" (and "shan"), the form of the wavelet
|
||||
name is now "cmorB-C" ("shanB-C") where B and C are floats representing the
|
||||
bandwidth frequency and center frequency. For "fbsp" the form should now
|
||||
incorporate three floats as in "fbspM-B-C" where M is the spline order and B
|
||||
and C are the bandwidth and center frequencies.
|
||||
+ Backwards incompatible changes
|
||||
* Python 2.6, 3.3 and 3.4 are no longer supported.
|
||||
* The order of coefficients returned by ``swt2`` and input to ``iswt2`` have been
|
||||
reversed so that the decomposition levels are now returned in descending rather
|
||||
than ascending order. This makes these 2D stationary wavelet functions
|
||||
consistent with all of the other multilevel discrete transforms in PyWavelets.
|
||||
* For ``wavedec``, ``wavedec2`` and ``wavedecn``, the ability for the user to
|
||||
specify a ``level`` that is greater than the value returned by
|
||||
``dwt_max_level`` has been restored. A ``UserWarning`` is raised instead of a
|
||||
``ValueError`` in this case.
|
||||
+ Bugs Fixed
|
||||
* Assigning new data to the ``Node`` or ``Node2D`` no longer forces a cast to
|
||||
``float64`` when the data is one of the other dtypes supported by the dwt
|
||||
(``float32``, ``complex64``, ``complex128``).
|
||||
* Calling ``pywt.threshold`` with ``mode='soft'`` now works properly for
|
||||
complex-valued inputs.
|
||||
* A segfault when running multiple `swt2` or `swtn` transforms concurrently has
|
||||
been fixed.
|
||||
* Several instances of deprecated numpy multi-indexing that caused warnings in
|
||||
numpy >=1.15 have been resolved.
|
||||
* The 2d inverse stationary wavelet transform, `iswt2`, now supports non-square
|
||||
inputs (an unnecessary check for square inputs was removed).
|
||||
* Wavelet packets no longer convert float32 to float64 upon assignment to nodes.
|
||||
* Doctests have been updated to also work with NumPy >= 1.14,
|
||||
* Indexing conventions have been updated to avoid FutureWarnings in NumPy 1.15.
|
||||
+ Other changes
|
||||
* Python 3.7 is now officially supported.
|
||||
- Remove upstream-included add_default_to_switch_statement.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 18 12:00:14 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-PyWavelets
|
||||
#
|
||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -12,21 +12,21 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-PyWavelets
|
||||
Version: 0.5.2
|
||||
Version: 1.0.1
|
||||
Release: 0
|
||||
Summary: PyWavelets is a Python wavelet transforms module
|
||||
License: MIT
|
||||
Group: Development/Libraries/Python
|
||||
URL: http://pypi.python.org/pypi/PyWavelets/
|
||||
Source0: https://files.pythonhosted.org/packages/source/P/PyWavelets/PyWavelets-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM add_default_to_switch_statement.patch -- Fix no return in nonvoid function error
|
||||
Patch0: add_default_to_switch_statement.patch
|
||||
Source10: https://media.readthedocs.org/pdf/pywavelets/v%{version}/pywavelets.pdf
|
||||
Source11: https://media.readthedocs.org/htmlzip/pywavelets/v%{version}/pywavelets.zip
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module nose}
|
||||
@@ -34,10 +34,7 @@ BuildRequires: %{python_module numpy-devel >= 1.9.1}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
# Documentation requirements
|
||||
BuildRequires: python3-Pygments
|
||||
BuildRequires: python3-Sphinx
|
||||
BuildRequires: python3-numpydoc
|
||||
BuildRequires: unzip
|
||||
Requires: python-numpy >= 1.9.1
|
||||
%python_subpackages
|
||||
|
||||
@@ -52,9 +49,9 @@ PyWavelets is a Python wavelet transforms module that can do:
|
||||
* Single and double precision calculations
|
||||
* Results compatibility with Matlab Wavelet Toolbox
|
||||
|
||||
%package -n %{name}-doc
|
||||
%package -n %{name}-doc
|
||||
Summary: This package contains the HMTL documentation of %{name}
|
||||
Group: Documentation/HTML
|
||||
Group: Documentation/Other
|
||||
Provides: %{python_module PyWavelets-doc = %{version}}
|
||||
|
||||
%description -n %{name}-doc
|
||||
@@ -68,15 +65,19 @@ PyWavelets is a Python wavelet transforms module that can do:
|
||||
* Single and double precision calculations
|
||||
* Results compatibility with Matlab Wavelet Toolbox
|
||||
|
||||
This Package contains the documentation of %{name} in HTML format.
|
||||
This Package contains the documentation of %{name} in HTML and PDF formats.
|
||||
|
||||
%prep
|
||||
%setup -q -n PyWavelets-%{version}
|
||||
%patch0 -p1
|
||||
sed -i -e '/^#!\//, 1d' pywt/tests/*.py
|
||||
|
||||
cp %{SOURCE10} .
|
||||
unzip %{SOURCE11} -d docs
|
||||
mv docs/pywavelets-* docs/html
|
||||
rm docs/html/.buildinfo
|
||||
|
||||
# Make docs non-executable
|
||||
chmod a-x *.rst
|
||||
chmod a-x *.txt
|
||||
chmod a-x PyWavelets.egg-info/*
|
||||
|
||||
# Fix wrong-script-interpreter
|
||||
@@ -107,23 +108,22 @@ $python -O -m compileall -d %{$python_sitearch} pywt/tests/
|
||||
popd
|
||||
}
|
||||
|
||||
# Create docs. These need the package to already be built and installed
|
||||
PYTHONPATH="$PYTHONPATH:%{buildroot}%{python3_sitearch}" make -C doc PAPER=letter html
|
||||
|
||||
# Remove hiden files
|
||||
find doc/build/html -name '.*' -exec rm {} \;
|
||||
|
||||
%check
|
||||
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
||||
%python_exec setup.py test
|
||||
mkdir test
|
||||
pushd test
|
||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
||||
$python -B -c 'import pywt;pywt.test()'
|
||||
}
|
||||
|
||||
%files %{python_files}
|
||||
%doc CHANGES.txt README.rst THANKS.txt
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python_sitearch}/pywt/
|
||||
%{python_sitearch}/PyWavelets-%{version}-py*.egg-info
|
||||
|
||||
%files -n %{name}-doc
|
||||
%doc doc/build/html
|
||||
%doc demo/
|
||||
%license LICENSE
|
||||
%doc pywavelets.pdf
|
||||
%doc docs/html
|
||||
|
||||
%changelog
|
||||
|
||||
3
pywavelets.pdf
Normal file
3
pywavelets.pdf
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0234c3e5ebb544e304088134a66f470889ac9f14f516c9873edffd9a8df8bea4
|
||||
size 514904
|
||||
3
pywavelets.zip
Normal file
3
pywavelets.zip
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:37eebdac36308059990b4b42fb14c63fb7cba3d5d2c631af929874461e57d8e1
|
||||
size 1891620
|
||||
Reference in New Issue
Block a user