Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-11 Thread Fabian Gans
ay, November 3, 2015 at 7:41:17 AM UTC+1, Christoph Ortner wrote: >>> >>> Why not do this via Compat.jl ? >>>> C >>>> >>>> On Tuesday, 3 November 2015 04:28:44 UTC, David Anthoff wrote: >>>>> >>>>> No, Compat generall po

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-03 Thread Tomas Lycken
at in julia 0.5 if you just use >>>> `[]` for slicing without anything else, you generate a warning, and then >>>> you have to opt-in to the NEW syntax. >>>> >>>> > -Original Message- >>>> > From: julia...@googlegroups.com

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-03 Thread Kristoffer Carlsson
> > -Original Message- >>> > From: julia...@googlegroups.com [mailto:julia- >>> > us...@googlegroups.com] On Behalf Of Eric Forgy >>> > Sent: Monday, November 2, 2015 3:30 PM >>> > To: julia-users >>> > Subject: RE: [julia-

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread Tomas Lycken
gt;> you have to opt-in to the NEW syntax. >> >> > -Original Message- >> > From: julia...@googlegroups.com [mailto:julia- >> > us...@googlegroups.com] On Behalf Of Eric Forgy >> > Sent: Monday, November 2, 2015 3:30 PM >> > To: julia-user

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread Christoph Ortner
15 3:30 PM > > To: julia-users > > > Subject: RE: [julia-users] Re: Re: are array slices views in 0.4? > > > > Hi David, > > > > I'm not an expert, i.e. I've never used it, but your idea "using > OldArrays" > > sounds exactly

RE: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread David Anthoff
- > From: julia-users@googlegroups.com [mailto:julia- > us...@googlegroups.com] On Behalf Of Eric Forgy > Sent: Monday, November 2, 2015 3:30 PM > To: julia-users > Subject: RE: [julia-users] Re: Re: are array slices views in 0.4? > > Hi David, > > I'm not an expert

RE: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread Eric Forgy
Hi David, I'm not an expert, i.e. I've never used it, but your idea "using OldArrays" sounds exactly like the purpose of Compat.jl, which I believe is the compatibility module referred to. Have a look and good luck: https://github.com/JuliaLang/Compat.jl

RE: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread David Anthoff
I’m not sure what you refer to by “Compatability module”. From: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On Behalf Of Christoph Ortner Sent: Monday, November 2, 2015 1:09 PM To: julia-users Subject: Re: [julia-users] Re: Re: are array slices views in 0.4? How is

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread Christoph Ortner
. > > > > *From:* julia...@googlegroups.com [mailto: > julia...@googlegroups.com ] *On Behalf Of *Cedric St-Jean > *Sent:* Monday, November 2, 2015 12:00 PM > *To:* julia-users > > *Subject:* Re: [julia-users] Re: Re: are array slices views in 0.4? > > > >

RE: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread David Anthoff
tefan Karpinski Sent: Tuesday, October 27, 2015 7:43 AM To: Julia Users > Subject: Re: [julia-users] Re: Re: are array slices views in 0.4? Yes, I'm concerned about this as well. I'm sure we'll come up with something. Maybe allow using the old behavior during a transitiona

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread Cedric St-Jean
> *From:* julia...@googlegroups.com [mailto: > julia...@googlegroups.com ] *On Behalf Of *Stefan Karpinski > *Sent:* Tuesday, October 27, 2015 7:43 AM > *To:* Julia Users > > *Subject:* Re: [julia-users] Re: Re: are array slices views in 0.4? > > > > Yes, I'm concerned about th

RE: [julia-users] Re: Re: are array slices views in 0.4?

2015-11-02 Thread David Anthoff
: julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] On Behalf Of Stefan Karpinski Sent: Tuesday, October 27, 2015 7:43 AM To: Julia Users Subject: Re: [julia-users] Re: Re: are array slices views in 0.4? Yes, I'm concerned about this as well. I'm sure we'll come up

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-27 Thread Stefan Karpinski
vior of slicing with [] will > change drastically, with essentially no indicator where in my code I might > run into trouble, right? > > > > *From:* julia-users@googlegroups.com [mailto:julia-users@googlegroups.com] > *On Behalf Of *Stefan Karpinski > *Sent:* Monday, Octo

RE: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-26 Thread David Anthoff
@googlegroups.com [mailto:julia-users@googlegroups.com] On Behalf Of Stefan Karpinski Sent: Monday, October 26, 2015 12:05 PM To: Julia Users Subject: Re: [julia-users] Re: Re: are array slices views in 0.4? On Mon, Oct 26, 2015 at 2:17 PM, Christoph Ortner mailto:christophortn...@gmail.com> >

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-26 Thread Christoph Ortner
Hi Stefan, Many thanks for the clarifications. Just for the record: I've often complained about the changes to Julia since 0.2, but this is one that I am more on the fence about. Christoph

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-26 Thread Stefan Karpinski
On Mon, Oct 26, 2015 at 2:17 PM, Christoph Ortner < christophortn...@gmail.com> wrote: > Fabian - Many thanks for your comments. This was very helpful. > > (c) if I want to write code now that shouldn't break with 0.5, what should >> I do? >> > > I think when you need a copy, just surround your ge

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-26 Thread Gabriel Gellner
On Monday, 26 October 2015 11:17:58 UTC-7, Christoph Ortner wrote: > > Fabian - Many thanks for your comments. This was very helpful. > > (c) if I want to write code now that shouldn't break with 0.5, what should >> I do? >> > > I think when you need a copy, just surround your getindex with a co

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-26 Thread Christoph Ortner
Fabian - Many thanks for your comments. This was very helpful. (c) if I want to write code now that shouldn't break with 0.5, what should > I do? > I think when you need a copy, just surround your getindex with a copy function. (e.g. copy(x[:,10]) instead of x[:,10]). But this would lead me t

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-26 Thread Fabian Gans
On Friday, October 23, 2015 at 9:08:55 PM UTC+2, Christoph Ortner wrote: > > > Apparently yes. For me it is very counterintuitive that this would be the > default behaviour. But presumably there was a lot of discussion that this > is desirable. > > (a) What are reasons, other than performance?

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-23 Thread Christoph Ortner
Apparently yes. For me it is very counterintuitive that this would be the default behaviour. But presumably there was a lot of discussion that this is desirable. (a) What are reasons, other than performance? (b) Is this still under discussion or pretty much settled? (c) if I want to write cod

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-23 Thread Stefan Karpinski
Yes, that's the whole premise of a view. On Fri, Oct 23, 2015 at 3:04 PM, Christoph Ortner < christophortn...@gmail.com> wrote: > > If I write into a view, does it change the original array? > > Christoph >

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-23 Thread Christoph Ortner
If I write into a view, does it change the original array? Christoph

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-23 Thread Steven G. Johnson
On Friday, October 23, 2015 at 12:24:59 PM UTC-4, Tom Breloff wrote: > > On this note, is there a good summary somewhere of the pros/cons between > using `sub` vs `slice` vs `ArrayViews.view`? > As I understand it, slice tries to squeeze the dimensions (producing lower-dimensional arrays if po

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-23 Thread Tom Breloff
On this note, is there a good summary somewhere of the pros/cons between using `sub` vs `slice` vs `ArrayViews.view`? On Fri, Oct 23, 2015 at 11:57 AM, Steven G. Johnson wrote: > On Friday, October 23, 2015 at 11:49:21 AM UTC-4, Neal Becker wrote: >> >> To be more precise, I'm coming from python

[julia-users] Re: Re: are array slices views in 0.4?

2015-10-23 Thread Steven G. Johnson
On Friday, October 23, 2015 at 11:49:21 AM UTC-4, Neal Becker wrote: > > To be more precise, I'm coming from python/numpy. There, a native slice: > M[1:,2:] for example > returns a view, not a copy. As does a strided view: > M[::2] > I like this design. Does julia do this now, or does it pla

Re: [julia-users] Re: Re: are array slices views in 0.4?

2015-10-23 Thread Tim Holy
My point is it's just notation. `M[:,2]` is notation for `getindex(M, :, 2)`, which returns a copy. `slice(M, :, 2)` returns a view. In julia 0.5, `M[:,2]` will effectively become notation for `slice(M, :, 2)`. So we're talking about a difference of 6 characters. I know syntax is important, and

[julia-users] Re: Re: are array slices views in 0.4?

2015-10-23 Thread Neal Becker
Tim Holy wrote: > This will be a ridiculous charicature, but this issue has come up so many > times that I think a little charicaturization is timely. > > With regards to arrays and views, the "big change" in julia 0.5 will > essentially be a 1-line change: > > getindex(A, indexes...) = sli