-
Notifications
You must be signed in to change notification settings - Fork 54
Add __complex__ to array object #486
Copy link
Copy link
Closed
Labels
API extensionAdds new functions or objects to the API.Adds new functions or objects to the API.
Description
We currently have respective dunder methods for bool/ints/floats, so if just for consistency x.__complex__() seems nice. Personally I've found the other methods hella useful for array-api-tests and Hypothesis, so imagine this will prove useful too.
I think we'd want to specify this just for complex-valued floating-point arrays, and adopters can choose to support real-valud float arrays if-and-however they so wish.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
API extensionAdds new functions or objects to the API.Adds new functions or objects to the API.