Skip to content

Commit

Permalink
043: Fixed data type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
HHansi committed Dec 22, 2020
1 parent 54159a8 commit 36433ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion embed2detect/event_word_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def get_event_words(event_windows: list, result_folder: str, n: int = None):
word_list = get_sorted_matrix_labels(vocab, np.asarray(diff_ut_matrix), descending=True,
non_zeros_only=True)

if n:
# Ignore filtering if n is found as a boolean
if n and not isinstance(n, bool):
event_words = word_list[:n]
else:
event_words = word_list
Expand Down

0 comments on commit 36433ac

Please sign in to comment.