Repository navigation
DEP: Warn about assigning 'data' attribute of ndarray - #7275
Conversation
|
Do we want this to be a visible deprecation? |
|
I get uneasy when there are memory issues of this kind involved, which is why I made the deprecation so visible. However, that is just my opinion. |
There was a problem hiding this comment.
Could you add a comment with date and numpy version? Grep for examples.
There was a problem hiding this comment.
This is better done in the standard way, grep for examples.
There was a problem hiding this comment.
Sure thing. I think my very first PR to numpy might have that! Let me double check.
There was a problem hiding this comment.
The standard form is something like
if (DEPRECATE("Calling partition with a non integer index"
" will result in an error in the future") < 0) {
return NULL;
}
|
@charris : Removed the mentioning of C code deprecations. Should be good to merge if there is nothing else. |
|
What I meant by "visible" is |
|
Oh, I see. I think I misunderstood you the first time around. Is there a way to get a |
|
Could be improved a bit, but since deprecation is temporary, good enough. Thanks Greg. |
DEP: Warn about assigning 'data' attribute of ndarray
|
Oh, alright. No problem then! |
|
You can grep for examples. It needs to be imported from the numpy package, which is OK since the import doesn't get run until the function is called and that is after numpy has been imported. |
|
Hmmm...I guess I was trying to see how to invoke it at the C level since that's where I had the deprecation initially, but I suppose we could intercepted it at the Python level as well so that we could use |
|
No, you can import it at the C level, grep for |
I don't like unsafe operations either. Closes #7093.
@njsmith