Import matplotlib in a good place

This commit is contained in:
Yohann D'ANELLO 2021-10-29 20:15:45 +02:00
parent eb754a30e5
commit 70fb848e2a
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,6 @@ import unicodedata
import sys
from typing import Optional
from matplotlib import pyplot as plt
import numpy as np
SHINGLE_SIZE = 5 # Known as k
@ -331,6 +330,8 @@ def graph(stream, display_tqdm: bool = False) -> None:
"""
Draw statistic graphs about false-positive and true positive rates using matplotlib.
"""
from matplotlib import pyplot as plt
docs = [line.rstrip('\n') for line in stream] # Read stream
docs = [normalize(doc) for doc in docs] # Remove special characters and normalize accents