Commit 442d5a9
Return early if there are no junctions to threshold.
Previously, if there were no junctions after filtering and k_threshold was None, you'd get a `ValueError` when trying to max over an empty array. Instead, return early if there are no junctions after filtering.
PiperOrigin-RevId: 875753172
Change-Id: I679ffad56a87ef1864826b9f7c4d1c7129a970151 parent ab97343 commit 442d5a9
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
247 | 251 | | |
248 | 252 | | |
| 253 | + | |
249 | 254 | | |
250 | | - | |
251 | 255 | | |
252 | 256 | | |
253 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
226 | 232 | | |
227 | 233 | | |
228 | 234 | | |
| |||
0 commit comments