Commit 3af7110
BUG: Fix image_from_array to handle non-contiguous arrays
GetImageViewFromArray always reversed the shape for non-vector
images, regardless of array memory layout. The C++ code reverses
the shape again for F-contiguous arrays, resulting in a double
reversal.
Only reverse the shape in Python for C-contiguous arrays. For
F-contiguous arrays, pass the shape as-is to C++ which handles
the reversal.
Co-authored-by: Matthew McCormick <matt@fideus.io>1 parent d53c803 commit 3af7110
2 files changed
Lines changed: 27 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
421 | 444 | | |
422 | 445 | | |
423 | 446 | | |
| |||
0 commit comments