Commit 631d938
Make if_positive keep strides of then_ if known. (#523)
* Make if_positive keep strides of then_ if known.
The previous version of `if_positive` always returns a C-ordered array even if `then_` is not C-ordered. This breaks artificial viscosity in Mirgecom when an array context uses a Fortran style data layout. This change makes the output have the same strides as `then_` if the shape of `then_` is known, otherwise it defaults to use the same layout as `criterion`.
* Increment version
* Resolve Flake8 failures
* Use more idiomatic != in shape comparison
Co-authored-by: Andreas Klöckner <[email protected]>1 parent 796c704 commit 631d938
2 files changed
+14
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2863 | 2863 | | |
2864 | 2864 | | |
2865 | 2865 | | |
2866 | | - | |
2867 | | - | |
2868 | | - | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
2869 | 2879 | | |
2870 | 2880 | | |
2871 | 2881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
0 commit comments