diff --git a/Orange/widgets/visualize/ownomogram.py b/Orange/widgets/visualize/ownomogram.py index 0ad19e68e20..fa63e41d984 100644 --- a/Orange/widgets/visualize/ownomogram.py +++ b/Orange/widgets/visualize/ownomogram.py @@ -848,7 +848,7 @@ def calculate_log_reg_coefficients(self): if len(self.domain.class_var.values) == 2: self.b0 = np.hstack((self.b0 * (-1), self.b0)) coeffs = np.vstack((coeffs * (-1), coeffs)) - self.log_reg_coeffs = [coeffs[:, ranges[i]] for i in range(len(attrs))] + self.log_reg_coeffs = [coeffs[:, r] for r in ranges] self.log_reg_coeffs_orig = self.log_reg_coeffs.copy() min_values = nanmin(self.data.X, axis=0) @@ -860,7 +860,7 @@ def calculate_log_reg_coefficients(self): coef = self.log_reg_coeffs[i] self.log_reg_coeffs[i] = np.hstack((coef * min_t, coef * max_t)) self.log_reg_cont_data_extremes.append( - [sorted([min_t, max_t], reverse=(c < 0)) for c in coef]) + [sorted([min_t, max_t], reverse=(c < 0)) for c in coef.flat]) else: self.log_reg_cont_data_extremes.append([None])