Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should we become pickier about array shape? #18031

Open
timholy opened this issue Aug 15, 2016 · 1 comment
Open

Should we become pickier about array shape? #18031

timholy opened this issue Aug 15, 2016 · 1 comment
Labels
design Design of APIs or of the language itself domain:arrays [a, r, r, a, y, s]

Comments

@timholy
Copy link
Sponsor Member

timholy commented Aug 15, 2016

We have many algorithms (examples: copy!, vecdot, scale!, etc.) that take two array inputs and check whether they have the same number of elements, but do not otherwise care about their dimensionality or indices. Essentially, the two arrays are "auto-reshaped" to match.

I'm wondering whether we should change this, and in most cases require that their indices match. This is more feasible now that we have a non-copying reshape that works for arbitrary array types. The whole concern about efficiency discussed in https://julialang.org/blog/2016/03/arrays-iteration (under "ReshapedArrays") would be important; we'd probably want to have a paradigm for switching to the parent's iterator once the indices have been checked.

Related: partial linear indexing, #14770.

@timholy timholy added the needs decision A decision on this change is needed label Aug 15, 2016
@toivoh
Copy link
Contributor

toivoh commented Aug 15, 2016 via email

@kshyatt kshyatt added the domain:arrays [a, r, r, a, y, s] label Aug 17, 2016
@StefanKarpinski StefanKarpinski added design Design of APIs or of the language itself and removed needs decision A decision on this change is needed labels Sep 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design of APIs or of the language itself domain:arrays [a, r, r, a, y, s]
Projects
None yet
Development

No branches or pull requests

4 participants