-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
DOC: Add release notes for complex types changes in 2.x #24362
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
Conversation
bb4a704
to
cf967e5
Compare
This looks so good it is a shame to hide it in a release note which might get lost with time. Could you merge most of the text with the existing complex section of the npymath docs, which is found in the sources here and leave a short summary in the release note? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy links to the release snippet and complex types info.
Build log is showing something off with .. version-changed
(line 519 in the log). There is also a warning about a missing ComplexWarning
import in scipy, but that should go away once scipy/scipy#19015 makes it into a nightly.
Thanks @lysnikolaou |
* The underlying C types for all of numpy's complex types have been changed to | ||
use C99 complex types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really true across all platforms and compilers? C99 complex types can be used with all the C arithmetic operators (+, -, *, /). If there are still some platforms where the complex type is being defined with a struct, it won't be possible to use the arithmetic operators with it, so we shouldn't make such a broad claim here. (I just ran into this in #24416, where the attempts to use arithmetic operators fails to compile on some platforms.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C99 complex types can be used with all the C arithmetic operators (+, -, *, /).
Unfortunately MSVC begs to differ. Their documentation states
Because complex numbers aren't a native type in the Microsoft compiler, the standard arithmetic operators aren't defined on complex types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That just means Microsoft does not implement C99--no surprise there, that has been the case forever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the wording on that page is a bit confusing. It says that it provides all of the function required by the C99 standard, but I guess the types themselves are not C99-compatible. Should we change the wording there?
Closes #24361.