Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.

Remove the Set trait in favor of the IndexAssign trait #75

Open
japaric opened this issue May 19, 2015 · 0 comments
Open

Remove the Set trait in favor of the IndexAssign trait #75

japaric opened this issue May 19, 2015 · 0 comments

Comments

@japaric
Copy link
Contributor

japaric commented May 19, 2015

This let us go from

A.slice_mut((a..b, c..d)).set(B.slice((e..f, g..h)));
A.row_mut(0).set(1.);
A.col_mut(1).set(0.)

to

A[(a..b, c..d)] = B.slice((e..f, g..h));
A[0] = 1.;
A[(.., 1)] = 0;

The same thing in Python/NumPy for reference:

A[a:b, c:d] = B[e:f, g:h]
A[0] = 1
A[:, 1] = 0

Blocked on rust-lang/rust#25628

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant