-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update DOFArray flatten and unflatten #275
Conversation
I don't see a principled reason to keep any of them. They seem kind of redundant now that there's a documented way to flatten given just an array context. |
c119f9a
to
935d896
Compare
At least for the tests in |
935d896
to
d2c7e28
Compare
d2c7e28
to
5f67a2f
Compare
Yep, I say let's remove them from the docs as well. |
Removed in 783686d. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Spotted one wrinkle, otherwise LGTM!
783686d
to
6b81549
Compare
Thx! |
Following up on inducer/arraycontext#91 (comment).
At the moment this just updates the docs in the
dof_array
flattening functions to also mention the ones inarraycontext
. There's a few of these:flatten
,unflatten
,unflatten_like
,flatten_to_numpy
andunflatten_from_numpy
; and all of them just work onDOFArray
s and leave the rest of the container alone.How many of these should be deprecated? At least the
numpy
ones have some nice usespytential
usesunflatten_from_numpy
in a couple of places. Not sure any of those actually flatten anything that's not aDOFArray
though.pytential
also usesflatten
quite a lot to talk tosumpy
. This could be replaced byarraycontext.flatten
+ reshape too, to make it(3, nparticles)
, I think, sincesumpy
supports both types of inputs.