Skip to content

Conversation

@alexreinking
Copy link
Member

The arguments were reversed.

We add a test, too.

Tagging release_notes because people should check their code.

Fixes #8676

@alexreinking alexreinking added release_notes For changes that may warrant a note in README for official releases. python Issues related to Halide/Python interop labels Jul 8, 2025
@alexreinking
Copy link
Member Author

I'm realizing we don't have a Python formatter. I've never liked how black performs on Halide code, but ruff appears more configurable (and is faster). I've liked how it performs on other projects. Maybe I take a look at that...

Copy link
Contributor

@mcourteaux mcourteaux left a comment

Choose a reason for hiding this comment

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

LGTM, except maybe that equality checking with == on a floating point pow is dangerous.

@alexreinking
Copy link
Member Author

alexreinking commented Jul 8, 2025

LGTM, except maybe that equality checking with == on a floating point pow is dangerous.

Yeah, but it passes and it's 2^3 / 3^2... those should be exact.

@alexreinking alexreinking merged commit f8e6641 into main Jul 10, 2025
16 of 17 checks passed
@alexreinking alexreinking deleted the python/fix-pow branch July 10, 2025 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Issues related to Halide/Python interop release_notes For changes that may warrant a note in README for official releases.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unrolling pow with integer powers in Python

4 participants