inducer / arraycontext

Choose your favorite numpy-workalike!
6 stars 11 forks source link

Avoid copy in flatten by not calling concatenate #141

Closed alexfikl closed 2 years ago

alexfikl commented 2 years ago

cl.array.concatenate seems to always create a copy, even if there's just one flat array (which seems to match numpy).

The flatten in meshmode returned the reshaped array without a copy if it could, so this can do that too, since it's a fairly common case.

inducer commented 2 years ago

Thx!