inducer / arraycontext

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

Add to_numpy and from_numpy on containers #13

Closed alexfikl closed 3 years ago

alexfikl commented 3 years ago

Ideally this would just be a rec_map_array_container(actx.from_numpy, ary), but the serialization gets confused by ndarrays that aren't object arrays.

I'm not quite sure how to fix that besides making is_array_container singledispatched again.

(NOTE: this was mostly inspired by trying to remove a hack in pytential)

inducer commented 3 years ago

Thanks!