-
Notifications
You must be signed in to change notification settings - Fork 402
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
lvalue semantic for diag #161
Comments
In that case let's do the same for triu, tril, and flipud/flipr. This has be mentioned in #158. |
The flip versions should be doable with views ans dynamic views eventually as mentioned by @wolfv in the original implementation. Diag probably requires a specific view. |
But |
This raises the question of how much we want to stick to numpy. I guess
that in the context of jet or pythran, the answer is *more*.
I don't have perspective on the sort of problematics you encounter in this
context and how you can handle semantic differences like this.
…On Mar 9, 2017 6:57 PM, "Wolf Vollprecht" ***@***.***> wrote:
But diag is actually not a view in NumPy.
To be honest I don't even know if it is a good idea to make the flips
views. This might be just an artifact on how it's implemented in NumPy. I
wouldn't really expect the source array to change after assigning something
to the flipped thing on a NumPy array.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#161 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACSXFpSLj5RTZnA4IceYw2ZpRoPuXVgaks5rkD1sgaJpZM4MXwgB>
.
|
But thinking about it, the case of diag is really quite unclear, isn't it? For example:
Or did you mean |
Yes I meant diagonal. |
by the way, the numpy docs mention
So I guess it would be a good move to overtake NumPy on this feature! :) |
Good catch. |
This was an experiment hijacking the xindexview (and using a functor instead of a container). However, the xindexview currently can only have a 1D shape, so the more advanced
|
Maybe the proposed functor view could also be used for |
It would make sense for diag to return an assignable view.
The text was updated successfully, but these errors were encountered: