[Pkg-octave-devel] Bug#500252: Bug#500252: octave-nan: std should accept an empty second arg
Thomas Weber
thomas.weber.mail at gmail.com
Fri Oct 10 12:24:27 UTC 2008
Am Freitag, den 26.09.2008, 17:46 +0200 schrieb Francesco Potorti`:
> Package: octave-nan
> Version: 1.0.6-1
> Severity: normal
>
> The following patch is needed to respect the syntax of Octave 3.0 std:
>
> diff -pu /usr/share/octave/packages/nan-1.0.6/std.m\~ /usr/share/octave/packages/nan-1.0.6/std.m
> --- /usr/share/octave/packages/nan-1.0.6/std.m~ 2008-05-16 16:09:51.000000000 +0200
> +++ /usr/share/octave/packages/nan-1.0.6/std.m 2008-09-26 17:12:36.000000000 +0200
> @@ -59,7 +59,7 @@ end;
>
> [y,n] = sumskipnan(center(x,DIM).^2,DIM);
>
> -if nargin<2,
> +if (nargin<2 || isempty(opt)),
> opt = 0;
> end;
>
>
> Without it, one gets this when nan is loaded:
>
> octave3.1> pkg load nan
> octave3.1> std ([1;2], [])
> ans = NaN
> octave3.1> statistics ([1;2])
> ans =
>
> 1.00000
> 1.00000
> 1.50000
> 2.00000
> 2.00000
> 1.50000
> NaN
> 0.00000
> -2.50000
I don't see this with upstream's 1.0.7 package, although std.m wasn't
changed.
Thomas
More information about the Pkg-octave-devel
mailing list