+1 Stefan. This is so much better and less likely to confuse. On Thursday, May 26, 2016, Stefan Karpinski <[email protected]> wrote:
> Perhaps these should be called Vector and Array? As in Vector(f(x) for x > in A) and Array(f(x) for x in A). > > On Wed, May 25, 2016 at 7:07 PM, Jeffrey Sarnoff < > [email protected] > <javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote: > >> I hope Julia is not ready to drop the immediacy of clarity when it is >> new-found and current use adjacent (e.g. "shape-preserving f(g(x) for x in >> A)"). >> It is reasonable that `collect` become this better version of its prior >> self; and, if desired, a vector-only version would have a new name or way >> of indication. >> `collectvec( __ )` might do `reshape( (__), prod(size(__)) )` >> >> >> >> On Wednesday, May 25, 2016 at 5:54:25 PM UTC-4, Jeff Bezanson wrote: >>> >>> Yes, so far this is intended. We want a shape-preserving `collect` for >>> implementing comprehensions, for example `collect(2x for x in A)`. >>> However a case could be made that `collect` should continue to return >>> only vectors, and the shape-preserving version should have a new name. >>> >>> On Wed, May 25, 2016 at 3:41 PM, <[email protected]> wrote: >>> > Hi, >>> > >>> > I am not sure if this is the right place to post questions about >>> version >>> > 0.5.0-, but I'll give it a try anyhow. >>> > >>> > In 0.4.5, collect([1 2]) gives Array{Int64,1}, like a column vector. >>> > >>> > In 0.5.0_ (as of 25 May, Win64), collect([1 2]) gives Array{Int64,2}, >>> like a >>> > row vector. >>> > >>> > Is this intended? (...just struggling to prepare for the next release) >>> > >>> > /Paul S >>> >> >
