Skip to content

Commit f6fe789

Browse files
authored
Merge pull request #4174 from janezd/fix-som-coredump
[FIX] Fix core dump in CI in SOM on sparse data
2 parents 666a2e7 + 181b87d commit f6fe789

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Orange/widgets/unsupervised/tests/test_owsom.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
def _patch_recompute_som(meth):
1616
def winners_from_weights(cont_x, *_1, **_2):
17-
n = len(cont_x)
17+
n = cont_x.shape[0]
1818
w = np.zeros((n, 2), dtype=int)
1919
w[n // 5:] = [0, 1]
2020
w[n // 3:] = [1, 2]
@@ -116,6 +116,7 @@ def test_missing_one_row_data(self):
116116
self.send_signal(widget.Inputs.data, None)
117117
self.assertFalse(widget.Warning.missing_values.is_shown())
118118

119+
@_patch_recompute_som
119120
def test_sparse_data(self):
120121
widget = self.widget
121122
self.iris.X = sp.csc_matrix(self.iris.X)

0 commit comments

Comments
 (0)