rafaqz / Stencils.jl

Static Stencil mapping for Julia
Other
8 stars 1 forks source link

Implement Base.copy for StencilArray and SwitchingStencilArray #43

Closed NilsNiggemann closed 5 months ago

NilsNiggemann commented 5 months ago

should resolve #42. Note that I am assuming that only the underlying arrays are not isbits and nothing else needs to be explicitly copied. I assume there is no way to mutate stencils objects or the other fields, right?

I wanted to also implement Base.similar but that broke some of the unit tests which assume similar to return a normal array. Perhaps it is best to also change the tests and rename my new method _similar into Base.similar?

rafaqz commented 5 months ago

Go ahead and change Base.similar

rafaqz commented 5 months ago

Thanks! I'll merge and get a breaking version bumped