[F] Fix nan in statistics
This commit is contained in:
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import sgs.api
|
import sgs.api
|
||||||
import sgs.calculations
|
import sgs.calculations
|
||||||
|
|
||||||
__version__ = '1.0.1'
|
__version__ = '1.0.2'
|
||||||
|
|||||||
@@ -124,6 +124,7 @@ def calc_col_stats(col: np.ndarray) -> Statistics:
|
|||||||
:param col: Input column (tested on 1D array)
|
:param col: Input column (tested on 1D array)
|
||||||
:return: Statistics
|
:return: Statistics
|
||||||
"""
|
"""
|
||||||
|
col = col[~numpy.isnan(col)]
|
||||||
q1 = np.quantile(col, 0.25)
|
q1 = np.quantile(col, 0.25)
|
||||||
q3 = np.quantile(col, 0.75)
|
q3 = np.quantile(col, 0.75)
|
||||||
return Statistics(
|
return Statistics(
|
||||||
|
|||||||
Reference in New Issue
Block a user