Commit 9fcf8fc
authored
Update features.py
Fixed:
ValueError: Samples can not be a single string. The input must be an iterable over iterables of strings.
By:
entry_name_hashed = FeatureHasher(50, input_type="string").transform([raw_obj['entry']]).toarray()[0]
with:
entry_name_hashed = FeatureHasher(50, input_type="string").transform([ [raw_obj['entry']] ]).toarray()[0]
at line 192.
In this way an iterable over iterable over raw features is obtained, as transform() method require.1 parent d97a0b5 commit 9fcf8fc
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
0 commit comments