Commit 4e3abcd
authored
* rasterize: validate resolution and chunks (#2066)
resolution must be finite and > 0; reject before dimension math so
inf/-1 no longer silently produce a 1x1 raster and 0/nan no longer
fall through to opaque downstream errors.
chunks must be positive; chunks=0 used to hang _normalize_chunks
(the loop condition decremented by zero), negatives diverged.
Closes #2066
* rasterize: document resolution and chunks constraints (#2066)
Docstring follow-up for the validation added in 5fd27cc: note that
resolution must be finite and > 0, and chunks must be > 0.
1 parent e531b1b commit 4e3abcd
2 files changed
Lines changed: 41 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1517 | 1517 | | |
1518 | 1518 | | |
1519 | 1519 | | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
1520 | 1526 | | |
1521 | 1527 | | |
1522 | 1528 | | |
| |||
2104 | 2110 | | |
2105 | 2111 | | |
2106 | 2112 | | |
2107 | | - | |
2108 | | - | |
2109 | | - | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
2110 | 2116 | | |
2111 | 2117 | | |
2112 | 2118 | | |
| |||
2135 | 2141 | | |
2136 | 2142 | | |
2137 | 2143 | | |
2138 | | - | |
2139 | | - | |
2140 | | - | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
2141 | 2147 | | |
2142 | 2148 | | |
2143 | 2149 | | |
| |||
2237 | 2243 | | |
2238 | 2244 | | |
2239 | 2245 | | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
| 2249 | + | |
| 2250 | + | |
| 2251 | + | |
| 2252 | + | |
2240 | 2253 | | |
2241 | 2254 | | |
2242 | 2255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
345 | 367 | | |
346 | 368 | | |
347 | 369 | | |
| |||
0 commit comments