Commit 2c31a4d
committed
refactor(render_points): tighten codes+palette per review
- datashader strip: when no two categories collapse to the same stripped colour
(the common case) reuse the int8 codes via rename_categories instead of building
an n-length int64 array; only remap (at the original int width) on a real collision.
- _scatter_points: guard the categorical codes path against an empty Categorical
(len check) so it can't hit BoundaryNorm with zero colours; correct the NaN comment.
- trim a narrating comment; dedup the scatter-kwargs in the new tests.
Output unchanged: strip is byte-equivalent to the old factorize path (verified incl.
alpha-collision and NaN); 63 non-visual render_points tests pass.1 parent 9707295 commit 2c31a4d
3 files changed
Lines changed: 18 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
| 113 | + | |
115 | 114 | | |
116 | 115 | | |
117 | 116 | | |
| |||
404 | 403 | | |
405 | 404 | | |
406 | 405 | | |
407 | | - | |
408 | | - | |
409 | | - | |
| 406 | + | |
| 407 | + | |
410 | 408 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
415 | 417 | | |
416 | 418 | | |
417 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | | - | |
| 1064 | + | |
1065 | 1065 | | |
1066 | 1066 | | |
1067 | 1067 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1349 | 1349 | | |
1350 | 1350 | | |
1351 | 1351 | | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
1352 | 1355 | | |
1353 | 1356 | | |
1354 | 1357 | | |
1355 | 1358 | | |
1356 | 1359 | | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | 1360 | | |
1366 | 1361 | | |
1367 | | - | |
| 1362 | + | |
1368 | 1363 | | |
1369 | 1364 | | |
1370 | 1365 | | |
| |||
1382 | 1377 | | |
1383 | 1378 | | |
1384 | 1379 | | |
1385 | | - | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
1389 | | - | |
1390 | | - | |
1391 | | - | |
1392 | | - | |
1393 | | - | |
1394 | | - | |
1395 | | - | |
1396 | | - | |
| 1380 | + | |
1397 | 1381 | | |
1398 | 1382 | | |
1399 | 1383 | | |
| |||
0 commit comments