[python-dtcwt] 87/497: promote integer input to transform to floating point
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:05:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.
commit de9922fdc6cfcf68fdd526d2edd99d351a14a87c
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Fri Aug 9 13:17:24 2013 +0100
promote integer input to transform to floating point
Fixes #7.
---
dtcwt/transform1d.py | 2 +-
dtcwt/transform2d.py | 2 +-
dtcwt/transform3d.py | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dtcwt/transform1d.py b/dtcwt/transform1d.py
index 3314388..c12cb60 100644
--- a/dtcwt/transform1d.py
+++ b/dtcwt/transform1d.py
@@ -38,7 +38,7 @@ def dtwavexfm(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include_
"""
# Need this because colfilter and friends assumes input is 2d
- X = np.asarray(X)
+ X = np.asfarray(X)
if len(X.shape) == 1:
X = np.atleast_2d(X).T
diff --git a/dtcwt/transform2d.py b/dtcwt/transform2d.py
index 83ef4dd..1561bc3 100644
--- a/dtcwt/transform2d.py
+++ b/dtcwt/transform2d.py
@@ -36,7 +36,7 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
.. codeauthor:: Cian Shaffrey, Cambridge University, Sept 2001
"""
- X = np.atleast_2d(X)
+ X = np.atleast_2d(np.asfarray(X))
# Try to load coefficients if biort is a string parameter
try:
diff --git a/dtcwt/transform3d.py b/dtcwt/transform3d.py
index b58a67d..b614483 100644
--- a/dtcwt/transform3d.py
+++ b/dtcwt/transform3d.py
@@ -49,7 +49,7 @@ def dtwavexfm3(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, ext_mod
.. codeauthor:: Nick Kingsbury, Cambridge University, July 1999.
"""
- X = np.atleast_3d(X)
+ X = np.atleast_3d(np.asfarray(X))
# Try to load coefficients if biort is a string parameter
try:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git
More information about the debian-science-commits
mailing list