[Pkg-octave-commit] [octave-statistics] 02/04: d/p/use-corr-instead-of-cor.patch: New patch

Rafael Laboissière rlaboiss-guest at moszumanska.debian.org
Sat May 2 16:27:17 UTC 2015


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

rlaboiss-guest pushed a commit to branch master
in repository octave-statistics.

commit ec78dba9d44ef510fc2fcd22cb3b705ff3901c97
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Sat May 2 12:59:03 2015 -0300

    d/p/use-corr-instead-of-cor.patch: New patch
---
 debian/patches/series                        |  1 +
 debian/patches/use-corr-instead-of-cor.patch | 29 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index f28ddb0..d8263f2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 data-files-for-tests.diff
 expose-tbl-delim-tests.patch
+use-corr-instead-of-cor.patch
diff --git a/debian/patches/use-corr-instead-of-cor.patch b/debian/patches/use-corr-instead-of-cor.patch
new file mode 100644
index 0000000..17583f2
--- /dev/null
+++ b/debian/patches/use-corr-instead-of-cor.patch
@@ -0,0 +1,29 @@
+Description: Use corr() instead of the deprecated cor() function
+ The cor() function has been removed from Octave 4.0. .
+Author: Rafael Laboissiere <rafael at laboissiere.net>
+Origin: upstream, http://sourceforge.net/p/octave/statistics/ci/2372ef1
+Bug: https://savannah.gnu.org/bugs/index.php?44985
+Last-Update: 2015-05-01
+
+--- octave-statistics-1.2.4.orig/inst/pdist.m
++++ octave-statistics-1.2.4/inst/pdist.m
+@@ -169,15 +169,15 @@ function y = pdist (x, metric, varargin)
+         if (rows(X) == 1)
+           error ("pdist: correlation distance between scalars not defined")
+         endif
+-        corr = cor (X);
+-        y = 1 - corr (sub2ind (size (corr), Xi, Yi))';
++        cor = corr (X);
++        y = 1 - cor (sub2ind (size (cor), Xi, Yi))';
+ 
+       case "spearman"
+         if (rows(X) == 1)
+           error ("pdist: spearman distance between scalars not defined")
+         endif
+-        corr = spearman (X);
+-        y = 1 - corr (sub2ind (size (corr), Xi, Yi))';
++        cor = spearman (X);
++        y = 1 - cor (sub2ind (size (cor), Xi, Yi))';
+ 
+       case "hamming"
+         d = logical (X(:,Xi) - X(:,Yi));

-- 
Alioth's /home/groups/pkg-octave/bin/git-commit-notice on /srv/git.debian.org/git/pkg-octave/octave-statistics.git



More information about the Pkg-octave-commit mailing list