Commit f714be8
fix(embedder): handle HashingVectorizer empty input gracefully
sklearn's HashingVectorizer.transform([]) raises StopIteration (>=1.5); guard
empty input to return a (0, n_features) array instead, matching the regression
test and the spec's intent.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 77482e8 commit f714be8
2 files changed
Lines changed: 9 additions & 3 deletions
File tree
- docs/superpowers/specs
- src/autointent/_wrappers/embedder
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | | - | |
383 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
384 | 386 | | |
385 | 387 | | |
386 | 388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| |||
0 commit comments