+1 Vector and Array 

On Thursday, May 26, 2016 at 9:51:37 AM UTC-4, Milan Bouchet-Valat wrote:
>
> Le jeudi 26 mai 2016 à 09:03 -0400, Stefan Karpinski a écrit : 
> > 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). 
> Cf. https://github.com/JuliaLang/julia/issues/16029 
>
>
> > On Wed, May 25, 2016 at 7:07 PM, Jeffrey Sarnoff 
> > <[email protected] <javascript:>> 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(__)) )`    
> > > 
> > > 
> > > 
> > > > 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  
> > > > 
>

Reply via email to