Skip to content

Conversation

cbourjau
Copy link
Contributor

Allow intrinsically eager functions (such as array.__bool__) to raise in lazy implementations. Closes #642

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.

Thanks @cbourjau. This looks like a good start. I added a few minor comments. Then, I think __complex__ should get the same note, right?

My main suggestion for more context is perhaps something that could go in a short design document on lazy/eager, that could be put under https://data-apis.org/array-api/latest/design_topics/index.html. That also gives us a place to add other future lazy evaluation related topics. I am happy to draft that as a follow-up to this PR; we can get this merged first to clarify things.

@rgommers rgommers added the topic: Lazy/Graph Lazy and graph-based array implementations. label Jul 13, 2023
@rgommers rgommers added this to the v2023 milestone Jul 13, 2023
@cbourjau
Copy link
Contributor Author

Thanks for the review! I addressed your comments as suggested.

@cbourjau
Copy link
Contributor Author

Is there anything missing in this PR before it could be merged?

@rgommers
Copy link
Member

Is there anything missing in this PR before it could be merged?

No, there isn't. My array API review bandwidth disappeared for a bit. In it goes, thanks again @cbourjau!

@rgommers rgommers merged commit 267a41c into data-apis:main Nov 16, 2023
@rgommers
Copy link
Member

My main suggestion for more context is perhaps something that could go in a short design document on lazy/eager, that could be put under https://data-apis.org/array-api/latest/design_topics/index.html. That also gives us a place to add other future lazy evaluation related topics. I am happy to draft that as a follow-up to this PR; we can get this merged first to clarify things.

I'll need to do this now.

rgommers added a commit to rgommers/array-api that referenced this pull request Nov 16, 2023
Follow-up to data-apisgh-652, which added notes to the specifications for
`__bool__` & co on this topic.
@rgommers
Copy link
Member

Follow-up in gh-708.

rgommers added a commit to rgommers/array-api that referenced this pull request Nov 16, 2023
Follow-up to data-apisgh-652, which added notes to the specifications for
`__bool__` & co on this topic.
rgommers added a commit that referenced this pull request Nov 27, 2023
Follow-up to gh-652, which added notes to the specifications for
`__bool__` & co on this topic.
@cbourjau cbourjau deleted the issue-642 branch November 28, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: Lazy/Graph Lazy and graph-based array implementations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eager functions in API appear in conflict with lazy implementation
2 participants