develooper Front page | | Postings from September 2000

Re: Implementing RFC 272

Thread Previous
Karl Glazebrook
September 24, 2000 07:45
Re: Implementing RFC 272
Message ID:

It was also described in one of the PDL RFCs ages ago.

The general data structure was described which basically
allows a:b:c slices, transposes (read arbitrary dimension
swapping) etc with no copy overhead.


$a = zeroes(5000,4000,3000);

$b = $a->slice('2:5000:2,3:3000,0:3000:10')->xchg(2,1);

incurs no copy penalty in $b. In particular changeing $b
changes $a, it is a 'virtual slice'

Karl wrote:
> Buddha Buck wrote:
> > When I heard about transpose() (as well as reshape(), etc), I was
> > concerned about the time it would take to execute these complex
> > operations.  To wit, naively, I believed that a lot of data shuffling
> > would be necessary.
> If I understand your message correctly this is exactly what PDL, NumPY,
> etc do right now and is also described in one of my messages I sent
> yesterday (Re: RFC 272 (v1) Arrays: transpose()) about implementing
> aliasing ;)
>   Christian

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About