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

2015-11-11 Thread Fabian Gans
to old versions. What >>>>> I'm suggesting is quite different, namely that 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

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

2015-11-03 Thread Tomas Lycken
se >>>> `[]` 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 [mailto:julia- >>>

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

2015-11-02 Thread Tomas Lycken
t; 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-users <juli

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

2015-11-02 Thread Christoph Ortner
r 2, 2015 3:30 PM > > To: julia-users <julia...@googlegroups.com > > > 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" > &g

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 <julia-users@googlegroups.com> Subject: Re: [julia-users] Re: Re: are array slices views in 0.4? Yes, I'm concerned about this as well. I'

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 <julia...@googlegroups.com > > *Subject:* Re: [julia-users] Re: Re: are array slices views in 0.4? > > > > Yes,

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

2015-11-02 Thread David Anthoff
:julia...@googlegroups.com ] On Behalf Of Stefan Karpinski Sent: Tuesday, October 27, 2015 7:43 AM To: Julia Users <julia...@googlegroups.com > 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 u

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 <julia...@googlegroups.com > > *Subject:* Re: [julia-users] Re: Re: are array slices vi

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

2015-11-02 Thread David Anthoff
ps.com ] On Behalf Of Cedric St-Jean Sent: Monday, November 2, 2015 12:00 PM To: julia-users <julia...@googlegroups.com > Subject: Re: [julia-users] Re: Re: are array slices views in 0.4? Python's from __future__ import division was a reasonable way of transitioning. I would use it

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
; 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 <julia-users@googlegroups.com> > Subject: RE: [julia-users] Re: Re: are array slices views in 0.4? > > Hi David, >

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

2015-10-27 Thread Stefan Karpinski
ober 26, 2015 12:05 PM > *To:* Julia Users <julia-users@googlegroups.com> > *Subject:* Re: [julia-users] Re: Re: are array slices views in 0.4? > > > > On Mon, Oct 26, 2015 at 2:17 PM, Christoph Ortner < > christophortn...@gmail.com> wrote: > > Fabian - Man

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

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 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 <julia-users@googlegroups.com> Subject: Re: [julia-users] Re: Re: are array slices views in 0.4? On Mon, Oct 26, 2015 at 2:17 PM, Christoph Ortner <chri

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

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-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

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 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,

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

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

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 >