Thanks. That's what I intend to do but I confess that I find the default to
Int64 a bit annoying (for example when writing wrappers to C functions whre
the Int(s) arguments are almost never Int64)
Domingo, 13 de Julho de 2014 10:50:12 UTC+1, Tim Holy escreveu:
>
> If this really matters to you, check out the implementations of find in
> base/array.jl. It's so short, you can trivially implement whatever
> behavior
> you want. For example, you could pass in an empty output array and have it
> push! the indexes into it.
>
> --Tim
>
> On Saturday, July 12, 2014 12:43:29 PM J Luis wrote:
> > > julia> find(x->x>5,a)
> > >
> > > 5-element Array{Int64,1}:
> > > 1
> > > 2
> > > 7
> > > 8
> > >
> > > 10
> >
> > which very very sadly are Int64. When dealing with large matrices this
> may
> > lead to a large memory waste. These almost mandatory 64 bits issue is
> one
> > the things that annoyed me more in Matlab for many times it was the
> > difference between having something work ... or not
>
>