Jonnie Diegelman

Results 118 comments of Jonnie Diegelman

This is a good method to have around as a backup, but I think it would be unfortunate if that were the only way you could use ComponentArrays in a...

This came up again on Slack today, so I'm going to go ahead and re-open this up to get some more opinions on it. I want to make sure this...

Hey, sorry for the delay. I *really* hope to get to this tonight.

Hey. Sorry to get back so late to this. I've been swamped with work and honestly just haven't had time to get to it. I doubt I'll be able to...

So I gave this a shot and it ultimately isn't going to work with the way `ComponentArray`s are currently built from keyword or `NamedTuple`s due to Zygote's limitation on mutation....

I'll usually use the `ComponentArray(data::AbstractArray, axis::AbstractAxis)` style of construction. So like ```julia ca_prototype = ComponentArray(x=0.0, y=0.0) const ax = getaxes(ca_prototype) function my_sum(v) ca = ComponentArray(v, ax) return ca.x + ca.y...

That's probably a good idea. The docs could also use a bit of work in general.

Calling `getindex` on a `ComponentArray` slices the array, rather than views. So in this case, the performance hit is partially due to you allocating a new array with the slice....

Oh that's interesting. I'll see if there's anything I can do to nudge type inference there.

There is sorta a way to handle this already by passing in an existing `ComponentArray` to the constructor with keyword arguments for the fields you want to merge. But I...