[Pkg-octave-commit] [SCM] octave branch, master, updated. 55667ff4fe8f8df97d1fab41847660536bd67736

Rafael Laboissiere rafael at debian.org
Sat May 23 14:52:37 UTC 2009


The following commit has been merged in the master branch:
commit 55667ff4fe8f8df97d1fab41847660536bd67736
Author: Rafael Laboissiere <rafael at debian.org>
Date:   Sat May 23 16:51:37 2009 +0200

    Add patch for making datenum accept vector inputs in any orientation.
    
    This is necessary for making the tests in the octave-time package succeed.
    Patch taken from the upstream Mercurial repository at:
    http://hg.savannah.gnu.org/hgweb/octave/raw-rev/4ab2488ab2b4

diff --git a/debian/changelog b/debian/changelog
index 232b928..b0faecc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+octave3.0 (1:3.0.5-6) UNRELEASED; urgency=low
+
+  * debian/patches/datenum-vector-input-any-orientation.dpatch: New patch
+    for making datenum accept vector inputs in any orientation.  This is
+    necessary for making the tests in the octave-time package succeed.
+    (Taken from the upstream Mercurial repository.)
+
+ -- Rafael Laboissiere <rafael at debian.org>  Sat, 23 May 2009 15:14:52 +0200
+
 octave3.0 (1:3.0.5-5) unstable; urgency=low
 
   * debian/patches/no-argout-intersect.dpatch: Take a bug fix for the
diff --git a/debian/in/00list b/debian/in/00list
index e318599..022c171 100644
--- a/debian/in/00list
+++ b/debian/in/00list
@@ -7,6 +7,7 @@ glpk-new-api.dpatch
 real-no-history.dpatch
 termios-h-check-3.0.dpatch
 no-argout-intersect.dpatch
+datenum-vector-input-any-orientation
 :][V_3_1:
 50_octave-bug-tempfile
 no_pdf_in_print.dpatch
diff --git a/debian/patches/datenum-vector-input-any-orientation.dpatch b/debian/patches/datenum-vector-input-any-orientation.dpatch
new file mode 100755
index 0000000..28796d6
--- /dev/null
+++ b/debian/patches/datenum-vector-input-any-orientation.dpatch
@@ -0,0 +1,44 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## -*- diff -*-
+## datenum-vector-input-any-orientation.dpatch by Rafael Laboissiere <rafael at debian.org>
+##
+## DP: Description: datenum: allow vector inputs in any orientation 
+## DP: Author: author Bill Denney
+## DP: Date: Thu Mar 27 15:17:53 2008 -0400
+## DP:
+## DP: Taken from upstream Mercurial repository at:
+## DP: http://hg.savannah.gnu.org/hgweb/octave/raw-rev/4ab2488ab2b4
+
+ at DPATCH@
+--- a/scripts/time/datenum.m    Thu Mar 27 15:14:10 2008 -0400
++++ b/scripts/time/datenum.m    Thu Mar 27 15:17:53 2008 -0400
+@@ -1,4 +1,4 @@
+-## Copyright (C) 2006, 2007 Paul Kienzle
++## Copyright (C) 2006, 2007, 2008 Paul Kienzle
+ ##
+ ## This file is part of Octave.
+ ##
+@@ -99,7 +99,7 @@
+   Y += fix ((M-14)/12);
+ 
+   ## Lookup number of days since start of the current year.
+-  D += monthstart (mod (M-1,12) + 1) + 60;
++  D += reshape (monthstart (mod (M-1,12) + 1), size (D)) + 60;
+ 
+   ## Add number of days to the start of the current year. Correct
+   ## for leap year every 4 years except centuries not divisible by 400.
+@@ -120,7 +120,13 @@
+ %!assert(datenum([2001,5,19;1417,6,12]), [730990;517712])
+ %!assert(datenum(2001,5,19,12,21,3.5), 730990+part, eps)
+ %!assert(datenum([1417,6,12,12,21,3.5]), 517712+part, eps)
++## Test vector inputs
+ %!test
+ %! t = [2001,5,19,12,21,3.5; 1417,6,12,12,21,3.5];
+ %! n = [730990; 517712] + part;
+ %! assert(datenum(t), n, 2*eps);
++## Make sure that the vectors can have either orientation
++%!test
++%! t = [2001,5,19,12,21,3.5; 1417,6,12,12,21,3.5]';
++%! n = [730990 517712] + part;
++%! assert(datenum(t(1,:), t(2,:), t(3,:), t(4,:), t(5,:), t(6,:)), n, 2*eps);
+

-- 
octave



More information about the Pkg-octave-commit mailing list