octave-maintainers
[Top][All Lists]
Advanced

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

Re: negative indeces found by "find"


From: John W. Eaton
Subject: Re: negative indeces found by "find"
Date: Tue, 26 Oct 2010 16:28:56 -0400

On 26-Oct-2010, David Bateman wrote:

| Levente Torok wrote:
| > Hi Guys,
| >
| > I have a sparse matrix docByWordsS.
| > octave:30> size(docByWordsS)
| > ans =
| >
| >    101970   333596
| >
| > octave:31> inx=find( docByWordsS );
| > octave:32> length(find(inx < 0))
| > ans =  228061
| >
| > octave:33> version % ubuntu
| > ans = 3.2.3
| >
| >
| > Have you already dealt with this thing?
| >
| > Thanks,
| >
| > Lev
| >
| >   
| With the script
| 
| n = 5e3; d = 1e-2;
| for i = 1:100
|   s = sprand(n,n,d);
|   inx = find(s);
|   if (length(find(s<0)) != 0)
|     error ("shouldn't happen");
|   endif
| endfor
| 
| and the head of the repository I can't generate this error. I haven't
| seen this error in the past either, so I can't explain. As I can't
| generate the same error either its a bit difficult to fix it.

I also can't duplicate the problem with 3.2.4 or the current
development version using David's script above.

But in any case, if you think you've found a bug, then please report
it on the bug tracker.  That's the best way to ensure that it isn't
lost and that someone might eventually debug it.  It's also essential
that you provide enough information for someone to be able to
reproduce the problem.

It may be that David's example run in the current version shows that
the problem is fixed.  Or not, since the bug may depend on the precise
layout of your sparse matrix, how it was created, or any number of
other things.  Please provide those details in your report.

Thanks,

jwe


reply via email to

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