[med-svn] [python-skbio] 01/01: Pull in upstream's fix of scipy issue

Kevin Murray daube-guest at moszumanska.debian.org
Sat Dec 24 07:34:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

daube-guest pushed a commit to branch master
in repository python-skbio.

commit 091ba5f9246f7ac59ce6b1ac5e1fd2eddca29a4b
Author: Kevin Murray <kdmfoss at gmail.com>
Date:   Thu Dec 22 20:07:45 2016 +1100

    Pull in upstream's fix of scipy issue
---
 ...ry-pick-upstream-fix-for-numpy-transition.patch | 35 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/0003-Cherry-pick-upstream-fix-for-numpy-transition.patch b/debian/patches/0003-Cherry-pick-upstream-fix-for-numpy-transition.patch
new file mode 100644
index 0000000..cc30ee2
--- /dev/null
+++ b/debian/patches/0003-Cherry-pick-upstream-fix-for-numpy-transition.patch
@@ -0,0 +1,35 @@
+From: Kevin Murray <kdmfoss at gmail.com>
+Date: Thu, 22 Dec 2016 20:07:13 +1100
+Subject: Cherry-pick upstream fix for numpy transition
+
+---
+ skbio/stats/composition.py | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/skbio/stats/composition.py b/skbio/stats/composition.py
+index eb6b364..95f7820 100644
+--- a/skbio/stats/composition.py
++++ b/skbio/stats/composition.py
+@@ -973,8 +973,8 @@ def ancom(table, grouping,
+ 
+     # Multiple comparisons
+     if multiple_comparisons_correction == 'holm-bonferroni':
+-        logratio_mat = np.apply_along_axis(_holm_bonferroni,
+-                                           1, logratio_mat)
++        logratio_mat = np.vstack([_holm_bonferroni(logratio_mat[i, :])
++                                  for i in range(logratio_mat.shape[0])])
+     np.fill_diagonal(logratio_mat, 1)
+     W = (logratio_mat < alpha).sum(axis=1)
+     c_start = W.max() / n_feat
+@@ -1079,9 +1079,8 @@ def _log_compare(mat, cats,
+ 
+     for i in range(c-1):
+         ratio = (log_mat[:, i].T - log_mat[:, i+1:].T).T
+-        m, p = np.apply_along_axis(func,
+-                                   axis=0,
+-                                   arr=ratio)
++        p = np.array([func(ratio[:, i])[1]
++                      for i in range(ratio.shape[1])])
+         log_ratio[i, i+1:] = np.squeeze(np.array(p.T))
+     return log_ratio
+ 
diff --git a/debian/patches/series b/debian/patches/series
index fcc25dc..9614d0f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 mathjax-path
 0002-use-libsww-as-library-not-embedded-src.patch
+0003-Cherry-pick-upstream-fix-for-numpy-transition.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-skbio.git



More information about the debian-med-commit mailing list