Commit f6be10a
committed
Do not report ndim > 1 without the shape
PyBUF_SIMPLE requests crashed on a multidimensional array: ndim > 1
implies shape != NULL (see PyBuffer_IsContiguous()). The buffer is C
contiguous, so it can be exposed as flat.
Also, only a multidimensional array is not Fortran contiguous, and
BufferError is more appropriate than TypeError.
Clear the strides when the shape which they point into is freed.1 parent 41371ae commit f6be10a
1 file changed
Lines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
505 | 506 | | |
506 | 507 | | |
| 508 | + | |
507 | 509 | | |
508 | 510 | | |
509 | 511 | | |
| |||
3134 | 3136 | | |
3135 | 3137 | | |
3136 | 3138 | | |
3137 | | - | |
3138 | | - | |
3139 | | - | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
3140 | 3142 | | |
3141 | 3143 | | |
3142 | 3144 | | |
| |||
3151 | 3153 | | |
3152 | 3154 | | |
3153 | 3155 | | |
3154 | | - | |
3155 | | - | |
| 3156 | + | |
| 3157 | + | |
| 3158 | + | |
| 3159 | + | |
| 3160 | + | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
| 3164 | + | |
| 3165 | + | |
| 3166 | + | |
3156 | 3167 | | |
3157 | | - | |
| 3168 | + | |
| 3169 | + | |
| 3170 | + | |
3158 | 3171 | | |
3159 | 3172 | | |
3160 | 3173 | | |
| |||
0 commit comments