Repository navigation
Conversation
|
Haven't found any specific ndarray attribute tests, any suggestions on where could they go? Also, if we agree to merge this it probably deserves a mention in the release notes. |
|
+100, but do we want to take the chance of having to revert it again if there is enough complains, or should we just go for a VisibleDeprecationWarning with a scary text first? |
|
Old version of Theano was doing the same at the C level in the past. But not now. We currently use PyArray_NewFromDescr. Is there an equivalent in python? We did this as we create our view ourself in some cases. Other people could do this in python. But I agree, doing it by changing the data ptr is dangerous, so I would consider just raising an error to tell that this isn't supported anymore and tell if they are in the rare case of wanting to build there own view, they should use the equivalent in python of PyArray_NewFromDescr. I would be surprised there is many complain, but we never know! |
|
You can use the |
|
If this goes in for 1.10, it needs a description in the release. But I admit being ambivalent, we already have so much that will likely break code somewhere... |
|
May be a problem with f2py. IIRC, there is a place where the data pointer (and other stuff) is swapped. Swapping pointers is also something used in some C++ std classes; swap with pointer in local class and the pointer gets deallocated when the function exits. Anyway, we might want a special function for swapping ndarray structure contents when needed. |
|
I think f2py changes the data pointer. C++ vectors have a swap method, ndarray could probably use the same. The functionality would be to swap the data contents of two ndarray structures. In C++ one of the two would be cleaned up when is when it went out of scope and we wouldn't have all that functionality in C, but could still be useful. |
|
A swap method in the C-Api might make sense. I seem to remember people saying that they need it. I personally hope it should not be needed (almost?) ever, and it is dangerous buisness if the array is referenced elsewhere.... (I doubt C++ vectors widely use views?) |
|
We should perhaps also be trying not to add more code that requires refcnt On Tue, Dec 22, 2015 at 11:00 AM, seberg [email protected] wrote:
Nathaniel J. Smith -- http://vorpus.org |
|
☔ The latest upstream changes (presumably #7275) made this pull request unmergeable. Please resolve the merge conflicts. |
Fixes #1873