Skip to content

Conversation

@SwayamInSync
Copy link
Member

Copilot Summary

This pull request adds support for the conjugate and conj unary operations for quad and long double types, treating them as no-ops since these types represent real numbers. It also updates documentation to reflect this new support.

New unary operations support

  • Added quad_conjugate and ld_conjugate functions to ops.hpp, implementing conjugate as a no-op for real numbers. [1] [2]
  • Registered the conjugate unary operation in init_quad_unary_ops and documented that conj is an alias, so no separate registration is needed.

Documentation update

  • Updated release_tracker.md to mark conj and conjugate as supported for both quad and long double types.

Copy link
Contributor

@juntyr juntyr left a comment

Choose a reason for hiding this comment

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

Could this PR have a very basic no-op test (what do we do for np.positive)?

@SwayamInSync
Copy link
Member Author

Could this PR have a very basic no-op test (what do we do for np.positive)?

for np.positive and others we just compare against the numpy's answer on float64 with some relative tolerance

@SwayamInSync
Copy link
Member Author

One reason I didn't add the tests because this covers only the real part of conjugate functionality i.e only returning the value back like identity.

@juntyr
Copy link
Contributor

juntyr commented Oct 17, 2025

I still think it would be good to test this, otherwise one could implement the function by returning pi

@SwayamInSync
Copy link
Member Author

Coool tests are added, lets merge this as well

@SwayamInSync SwayamInSync merged commit f67f5f1 into numpy:main Oct 17, 2025
9 checks passed
@SwayamInSync SwayamInSync deleted the conj branch October 17, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants