Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Numpy-like functions #280

Open
bleyerj opened this issue Apr 29, 2024 · 1 comment
Open

Add Numpy-like functions #280

bleyerj opened this issue Apr 29, 2024 · 1 comment

Comments

@bleyerj
Copy link

bleyerj commented Apr 29, 2024

I found it sometimes painful to use UFL when reshaping matrix/vectors, etc.

It would be useful to have UFL functions mimicking numpy like behavior such as:
flatten, reshape, vstack, hstack, concatenate, etc.

I would be happy to make a proposal if we agree on this

@dham
Copy link
Collaborator

dham commented Apr 29, 2024

Presumably all of these are syntactic sugar for combinations of indexing on the one hand, and as_vector and as_tensor on the other. That being the case, this seems fairly unobjectionable.

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

No branches or pull requests

2 participants