Hi,

You will find attached below three patches that are currently applied
to the Debian package octave-statistics (upcoming version 1.1.0-1).  They
fix problems in the test suite for some functions.

The rationale and purpose of each patch is given in the respective patch
header.

Best,
Description: Fix normalise_distribution under Octave 3.6
 Upstream applied (in r9016) a workaround for a regression in Octave core 3.4
 (bug#34765 in savannah). In r9028, upstream made this workaround apply to
 Octave 3.4, but not to Octave 3.6, assuming that the bug has been fixed in
 Octave 3.6. But obviously this is not the case as of Octave 3.6.1, so we still
 need the workaround.
Author: Sébastien Villemot <sebastien.ville...@ens.fr>
Last-Update: 2012-04-13
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/inst/normalise_distribution.m
+++ b/inst/normalise_distribution.m
@@ -198,7 +198,7 @@
       ## differently depending on octave version. This applies the fix for all
       ## 3.4 releases but it probably only appeared on 3.4.3 (can someone check?)
       ## See https://savannah.gnu.org/bugs/index.php?34765
-      if (compare_versions (OCTAVE_VERSION, "3.4", "<") || compare_versions (OCTAVE_VERSION, "3.6", ">"))
+      if (compare_versions (OCTAVE_VERSION, "3.4", "<"))
         ## this is how it should work
         f_remap = @( k ) ( normal ( k ) );
         normalised ( :, k ) = arrayfun ( f_remap, target_indices );
Description: Fix combnk with cell arrays
 Without this patch, the following test fails on Octave 3.6:
 %!test
 %! c = combnk ({1, 2, 3}, 2);
 %! assert (c, {1, 2; 1, 3; 2, 3});
Author: Sébastien Villemot <sebastien.ville...@ens.fr>
Last-Update: 2012-03-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/inst/combnk.m
+++ b/inst/combnk.m
@@ -51,7 +51,11 @@
   else
     ## Process data
     n = numel (data);
-    retval = [];
+    if iscell (data)
+      retval = {};
+    else
+      retval = [];
+    endif
     for j = 1:n
       C = __combnk__ (data ((j+1):end), k-1);
       C = cat (2, repmat (data (j), rows (C), 1), C);
Description: Clear last warning state in linkage test
 This patch clears the state of the last warning before running warning-based
 tests in the linkage function. This is necessary when we run the whole package
 testsuite in a single shot: if a previous test emits a warning, the test in
 linkage will fail. This may be the symptom of a bug in Octave, but I am not
 totally sure.
Author: Sébastien Villemot <sebastien.ville...@ens.fr>
Last-Update: 2012-03-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/inst/linkage.m
+++ b/inst/linkage.m
@@ -217,6 +217,7 @@
 %!assert (cond (linkage (pdist (x), "complete")),  21.793345,t);
 %!assert (cond (linkage (pdist (x), "average")),   27.045012,t);
 %!assert (cond (linkage (pdist (x), "weighted")),  27.412889,t);
+%!test lastwarn() % Clear last warning
 %!warning <monotonically> linkage (pdist (x), "centroid");
 %!test warning off clustering
 %! assert (cond (linkage (pdist (x), "centroid")), 27.457477,t);
-- 
Sébastien Villemot
Researcher in Economics & Debian Maintainer
http://www.dynare.org/sebastien
Phone: +33-1-40-77-84-04 - GPG Key: 4096R/381A7594

Attachment: pgpxNTrm4B31i.pgp
Description: PGP signature

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to