forked from ScoDoc/ScoDoc
Fix #394 (export Apo NaN)
This commit is contained in:
parent
36f78d36cb
commit
1e7cc06399
@ -92,6 +92,7 @@ import time
|
|||||||
from zipfile import ZipFile
|
from zipfile import ZipFile
|
||||||
|
|
||||||
from flask import send_file
|
from flask import send_file
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
# Pour la détection auto de l'encodage des fichiers Apogée:
|
# Pour la détection auto de l'encodage des fichiers Apogée:
|
||||||
from chardet import detect as chardet_detect
|
from chardet import detect as chardet_detect
|
||||||
@ -134,6 +135,8 @@ def _apo_fmt_note(note, fmt="%3.2f"):
|
|||||||
val = float(note)
|
val = float(note)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return ""
|
return ""
|
||||||
|
if np.isnan(val):
|
||||||
|
return ""
|
||||||
return (fmt % val).replace(".", APO_DECIMAL_SEP)
|
return (fmt % val).replace(".", APO_DECIMAL_SEP)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user