Skip to content

Logical operations#31

Merged
samuela merged 4 commits into
samuela:mainfrom
mavenlin:logical
Sep 3, 2025
Merged

Logical operations#31
samuela merged 4 commits into
samuela:mainfrom
mavenlin:logical

Conversation

@mavenlin

@mavenlin mavenlin commented Sep 2, 2025

Copy link
Copy Markdown
Contributor

Let's split the #29 into several PRs.

Comment thread torch2jax/__init__.py Outdated
Comment thread torch2jax/__init__.py Outdated

@samuela samuela left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

thanks @mavenlin !

Comment thread tests/test_core.py
assert t2j(f)(jnp.array([True]))
assert t2j(f)(jnp.array([[True]]))
# jitted version should fail, because casting traced dynamic value to bool is not allowed in jax.
# jax.jit(t2j(f))(jnp.array(True))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

nit: could do with pytest.raises(ErrorType) here, but that's not necessary to merge imho

@samuela
samuela merged commit cb1c4ca into samuela:main Sep 3, 2025
1 check passed
@mavenlin
mavenlin deleted the logical branch September 3, 2025 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants