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

Add complex number support to not_equal #529

Merged
merged 1 commit into from
Dec 13, 2022
Merged

Add complex number support to not_equal #529

merged 1 commit into from
Dec 13, 2022

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Nov 28, 2022

This PR

  • adds complex number support to not_equal by documenting special cases. By convention, inequality is determined by independently comparing real and imaginary components respectively and then performing a logical OR (i.e., if x = a + bj and y = c + dj, then x != y iff a != c OR b != d.
  • follows precedent in Python, Julia, NumPy, and elsewhere.
  • does not embrace the one-infinity model in which all infinities in the complex plane map to a single infinity (see Riemann sphere), as doing so would lead to unintuitive results when casting real-valued infinities to complex infinities.
  • this PR depends on Add complex number support to equal #528 which includes a design document which this PR references.

@kgryte kgryte added API change Changes to existing functions or objects in the API. topic: Complex Data Types Complex number data types. labels Nov 28, 2022
@kgryte kgryte added this to the v2022 milestone Nov 28, 2022
Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Content seems fine, duplication will be cleaned up later. LGTM, in it goes. Thanks @kgryte

@rgommers rgommers merged commit f4de335 into main Dec 13, 2022
@rgommers rgommers deleted the cmplx-not-equal branch December 13, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API change Changes to existing functions or objects in the API. topic: Complex Data Types Complex number data types.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants