octave-maintainers
[Top][All Lists]
Advanced

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

Re: sqrtm test failure


From: Jordi Gutiérrez Hermoso
Subject: Re: sqrtm test failure
Date: Sat, 30 Jul 2011 22:10:01 -0500

On 29 July 2011 05:10, Marco atzeri <address@hidden> wrote:
> on src/DLD-FUNCTIONS/sqrtm.cc
> the following test is failing
>
> %!assert (isnan (sqrtm ([0 1; 0 0])))
>
> but it is not clear to me, what is the expected results
> as isnan applied to a matrix produces a matrix
>
>> sqrtm ([0 1; 0 0])
> warning: sqrtm: matrix is singular, may not have a square root
> ans =
>
>     0   NaN
>     0   NaN
>
>
>> isnan(sqrtm ([0 1; 0 0]))
> warning: sqrtm: matrix is singular, may not have a square root
> ans =
>
>   0   1
>   0   1

I wrote that test during the code sprint, because certain kinds of
matrices should fail to produce a square root. Perhaps rewrite the
test to use "any"? Or could the output be anything? Is there a way
merely test that it produces a warning?

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]