From d88bb66d9291bf29df1a525e7d091d09e56ae65d Mon Sep 17 00:00:00 2001 From: davidge807 Date: Tue, 3 Jan 2023 09:33:33 +0100 Subject: [PATCH] Descriptives issue --- opennn/statistics.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/opennn/statistics.cpp b/opennn/statistics.cpp index 3288e2032..270cd9eac 100644 --- a/opennn/statistics.cpp +++ b/opennn/statistics.cpp @@ -315,7 +315,6 @@ Histogram::Histogram(const Tensor& data, corresponding_bin = int((value - data_minimum) / step); - if(corresponding_bin >= number_of_bins) corresponding_bin = number_of_bins - 1; @@ -1932,6 +1931,13 @@ Tensor descriptives(const Tensor& matrix, standard_deviation(i) = sqrt(variance); } } + else + { + for(Index i = 0; i < columns_indices_size; i++) + { + standard_deviation(i) = 0; + } + } for(Index i = 0; i < columns_indices_size; i++) {