On Tue, Oct 26, 2010 at 10:25 PM, David Bateman
<address@hidden> wrote:
Levente Torok wrote:
> Hi David,
>
> This seems to be an index overflow.
> I uploaded the matrix here:
> <URL deleted
> Let me know if you have downloaded. I need to delete it.
>
> Thanks,
> Lev
>
Ok I've downloaded the file and I can reproduce this, but its not a bug
as such... The issue is that the size of the matrix is 101970 by 333596
and 101970*333596 is greater than 2^31 which is the larger integer index
that octave can use. So you are seeing an integer overflow.
You have two choices. Build a 64-bit version of Octave (search the list
for how to do this) or if you instead index with
[inx, iny] = find(docByWordsS);
instead the individual indices will be smaller than 2^31.. Note however
that you still might have some issues with such a large matrix without a
64-bit version of Octave, as some operations and functions might index
the matrix with a single index triggering the same issue.
D.
Thanks David!!
With this, I can solve my problem.
I think, I'll go along with the prebuilt 32 bit version on my ubuntu amd64.
(BTW, I don't really understand why it is built for 32 bit)
However, you are not a naive user and you couldn't really capture the bug at the first sight.
I suspect the rest of the audience is just like you. For this reason I suggest to drop a warning message and/or a suggestion with solution when index overflow like this happens, if possible.
Q: @John, should I report it as a bug?
Thanks,
Lev