Closed jipolanco closed 1 year ago
Merging #83 (e46f30a) into master (4bcee2e) will increase coverage by
0.08%
. The diff coverage is100.00%
.:exclamation: Current head e46f30a differs from pull request most recent head 2cfd8af. Consider uploading reports for the commit 2cfd8af to get more accurate results
@@ Coverage Diff @@
## master #83 +/- ##
==========================================
+ Coverage 96.67% 96.76% +0.08%
==========================================
Files 24 24
Lines 1233 1235 +2
==========================================
+ Hits 1192 1195 +3
+ Misses 41 40 -1
Impacted Files | Coverage Δ | |
---|---|---|
src/arrays.jl | 94.16% <100.00%> (+0.94%) |
:arrow_up: |
This PR changes the behaviour of
similar(u::PencilArray, [T], [dims])
when thedims
argument is passed.First note that we cannot construct a
PencilArray
which is "similar" tou
but having different dimensions, since in that case we would need to generate a newPencil
configuration which is not supported.For this reason, and to make sure that the return type doesn't depend on the value of
dims
, callingsimilar
used to return a non-distributed array (most often a regularArray
) wheneverdims
was passed.Now, we instead make sure that
similar
always returns aPencilArray
. This is in particular needed if one wants to combine PencilArray, StructArrays and DiffEq.jl. So, whendims
is passed, we now throw an error ifdims
is different from the size ofu
.