octave-maintainers
[Top][All Lists]
Advanced

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

Re: Bug in any on sparse boolean


From: David Bateman
Subject: Re: Bug in any on sparse boolean
Date: Thu, 20 Jan 2011 02:49:01 +0100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706)

Kim Hansen wrote:
> On Wed, Jan 19, 2011 at 01:08, Kim Hansen <address@hidden> wrote:
>   
>> I think I have found a bug that affects any() when used on sparse booleans:
>>     
>
> I am not sure that it is any() that is the problem.
>
> My guess is now that the error is somewhere in:
>     template <class T>
>     Sparse<T>::Sparse (const Array<T>& a, const idx_vector& r,
>                    const idx_vector& c, octave_idx_type nr,
>                    octave_idx_type nc, bool sum_terms,
>                    octave_idx_type nzm)
>
>
> I think this is an example of how to provoke the bug:
>
> octave:1> sparse(1, 1:5, true, 1, 5)
> ans =
>
> Compressed Column Sparse (rows = 1, cols = 5, nnz = 5 [100%])
>
>   (1, 1) ->  1
>   (-1216302479, 2) ->  1
>   (135704533, 3) ->  1
>   (18, 4) ->  1
>   (138870485, 5) ->  1
>
> octave:2>
>
>
> The bug is on trunk and I will keep searching for a solution.
>
>   
In fact the second problem you found Kim was an independent bug, but I
believe the changeset

http://hg.savannah.gnu.org/hgweb/octave/rev/0e414f837c58

addresses this bug and the one identified in the any function of sparse
boolean matrices

D.




reply via email to

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