actually here a sparse meshgrid seems to be the same, and uses significantly less memory, I'll update to that