Skip to content

Conversation

@alexfikl
Copy link
Collaborator

This adds a .flatten() method to tensor products to recursively flatten them into simplices (mostly). The automatic flattening in the constructor is marked as deprecated.

Fixes #126.

@inducer
Copy link
Owner

inducer commented Jul 28, 2025

I'm supportive of this change. How come it's marked as draft?

@alexfikl
Copy link
Collaborator Author

I'm supportive of this change. How come it's marked as draft?

Wasn't quite sure about adding that flatten: bool = True argument and outright deleting the custom __new__ implementation. Doesn't seem to break anything though, so should at least be good for a quick review 😁

@alexfikl alexfikl force-pushed the remove-tensor-product-flatten branch 2 times, most recently from 7226f10 to 37ea45f Compare July 30, 2025 07:13
@alexfikl alexfikl force-pushed the remove-tensor-product-flatten branch from 37ea45f to a27cd45 Compare July 30, 2025 07:14
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.

Stop auto-flattening and simplifying TensorProducts

2 participants