[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in any on sparse boolean
From: |
Kim Hansen |
Subject: |
Re: Bug in any on sparse boolean |
Date: |
Thu, 20 Jan 2011 00:12:42 +0100 |
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.
--
Kim Hansen
Vadgårdsvej 3, 2.tv
2860 Søborg
Phone: +45 3091 2437