[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Pkg-octave-devel] Bug#731992: marked as done (octave-statistics: princomp fails with nargout < 2)



Your message dated Sun, 02 Feb 2014 09:22:00 +0000
with message-id <E1W9tFY-0007ac-9b@franck.debian.org>
and subject line Bug#731992: fixed in octave-statistics 1.2.3-1
has caused the Debian Bug report #731992,
regarding octave-statistics: princomp fails with nargout < 2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
731992: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731992
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: octave-statistics
Version: 1.2.2-1
Severity: normal
Tags: upstream patch

The princomp function as included in octave-statistics always throws an
error in context where only first return value is expected:

hyper% octave -q --no-init-file
warning: function /usr/share/octave/packages/statistics-1.2.2/fstat.m shadows a core library function
octave:1> princomp(rand(10,2))
error: 'r' undefined near line 103 column 48
error: invalid limit value in colon expression
error: evaluating argument list element number 1
error: called from:
error:   /usr/share/octave/packages/statistics-1.2.2/princomp.m at line 103, column 9
octave:1>

As far as I can tell this is a trivial bug caused by the fact that 'r'
is only calculated if nargout > 1 and not needed otherwise so it can be
fixed with the simple patch attached.


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (900, 'testing'), (700, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=pl_PL.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages octave-statistics depends on:
ii  octave     3.6.4-4
ii  octave-io  1.2.5-1

octave-statistics recommends no packages.

octave-statistics suggests no packages.

-- no debconf information
diff --git a/inst/princomp.m b/inst/princomp.m
index 786d07d..3bbc3cb 100644
--- a/inst/princomp.m
+++ b/inst/princomp.m
@@ -99,10 +99,11 @@ function [COEFF,SCORE,latent,tsquare] = princomp(X,varargin)
 
     endif
 
-    # This is the same as the eigenvalues of the covariance matrix of X
-    latent  = (diag(S'*S)/(size(Xcentered,1)-1))(1:r);
-
     if nargout > 2
+
+      # This is the same as the eigenvalues of the covariance matrix of X
+      latent  = (diag(S'*S)/(size(Xcentered,1)-1))(1:r);
+
       if !(nargin == 2 && strcmpi ( varargin{:} , "econ"))
 	  latent= [latent;zeros(nvars-r,1)];
       endif

--- End Message ---
--- Begin Message ---
Source: octave-statistics
Source-Version: 1.2.3-1

We believe that the bug you reported is fixed in the latest version of
octave-statistics, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 731992@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Sébastien Villemot <sebastien@debian.org> (supplier of updated octave-statistics package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 02 Feb 2014 10:09:28 +0100
Source: octave-statistics
Binary: octave-statistics
Architecture: source all
Version: 1.2.3-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Octave Group <pkg-octave-devel@lists.alioth.debian.org>
Changed-By: Sébastien Villemot <sebastien@debian.org>
Description: 
 octave-statistics - additional statistical functions for Octave
Closes: 731992
Changes: 
 octave-statistics (1.2.3-1) unstable; urgency=medium
 .
   [ Sébastien Villemot ]
   * Imported Upstream version 1.2.3
   * debian/copyright: reflect upstream changes.
   * princomp-one-arg.patch: new patch, fixes princomp with only one arg.
     (Closes: #731992)
 .
   [ Rafael Laboissiere ]
   * Bump to Standards-Version 3.9.5, no changes needed
Checksums-Sha1: 
 c89cd1e2772f793b287bcc3514d74d921637a93a 2096 octave-statistics_1.2.3-1.dsc
 fba40342a265053323c36c590a74d9567e4a0870 100186 octave-statistics_1.2.3.orig.tar.gz
 3b0c485d2b6f9fe9e0a25b344d61a6af58850592 5440 octave-statistics_1.2.3-1.debian.tar.xz
 d8d99a36bf19380e14c9d5d9eeee8ba9110f9016 97486 octave-statistics_1.2.3-1_all.deb
Checksums-Sha256: 
 1528d0d9e85e019007d12810dd9dc670f34bf1d17b21ba926f71b71c278aa2ef 2096 octave-statistics_1.2.3-1.dsc
 b6dace7fad00eb5a9ec3c4082c455a60fd90e8de1b36777a96925fff085d6931 100186 octave-statistics_1.2.3.orig.tar.gz
 beb599a4e4e583f29f50bf7289f37bfb0eb2abd40c86114a2b36bfea9aeabf02 5440 octave-statistics_1.2.3-1.debian.tar.xz
 1fda047cf5c0d72d08bb245079155d33355b46a8b54ce9021396c3ad66c133c4 97486 octave-statistics_1.2.3-1_all.deb
Files: 
 e11d905b40e5a91695c31c7f60de5110 2096 math optional octave-statistics_1.2.3-1.dsc
 14a88e21a5c8500ed38f280afb2f9e74 100186 math optional octave-statistics_1.2.3.orig.tar.gz
 18af0fe04e283935d9c10ada9446c6e6 5440 math optional octave-statistics_1.2.3-1.debian.tar.xz
 d4c9e45dddab92f2160b380e5965420a 97486 math optional octave-statistics_1.2.3-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJS7gx4AAoJECzs6TUOzr5Kn50P/AzStJH/rJSFGS4a+v+VC5eP
tThJynaT5fkxuGxNybyU0AhhoDciaSH5oNXqCZL2mIbPmogfKtnzZsshUXzNlhk7
6KvxzgSbQm23angDUTR4EWlFKPFe9dM9hty7XwVCZ6XR0fpRjJSXOYNspDypcwDr
TVMay3ts0zKhHoutHL5MGys+Wuk/PMs93wTYOy7fnm3MuUX2Mx3Efjt9SapQh2YY
LjTqKK7oWnEbDMy1Yb4xxLUukzlqOzR9tTfdLJ7zC7omaCEDqadXWYTTkbYNONX+
sDB4syPwsC413Kq92gRT5PFtjOvVWhozfueWhDL8LxOR5VmRR6H6RkpT6N3RD/VQ
jOOG0lVmnHoB7ehk2f1acXgpugOv/RP/QUfv0oqg9MZm6PmtcO5N7nOBr4Jj+ZyG
Sru3/p7KFJfbWf2cwQ9sNkVdykeiP3bIgRoV0+OBciMRWjLwI6z/lYxZq+iMJGhX
SWEH1qGmFu04Do6wWDnv35/vyI4ebUp7rO4+lN3pXMK9+GHBWvSsQ5kRAr4bhVbN
9+uaXpa0NJyE8m0PJEq/Qq1Z7bW/eVI6s6FU7L6DmOewLN9AqbiUYdw1CUz2G+zB
H/aZOsXWWbH/7fjaAbneSEhvB+pAQ8Hz0d1vjBbx1KkwC+OTgjfFgViy0tmGytiB
qfONAdD/mcUi+igqQ0Kx
=SGvi
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: