File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -896,9 +896,10 @@ def test_none_data(self):
896896
897897 def test_plot_once (self , timeout = DEFAULT_TIMEOUT ):
898898 """Test if data is plotted only once but committed on every input change"""
899+ table = Table ("heart_disease" )
899900 self .widget .setup_plot = Mock ()
900901 self .widget .commit = Mock ()
901- self .send_signal (self .widget .Inputs .data , self . data )
902+ self .send_signal (self .widget .Inputs .data , table )
902903 self .widget .setup_plot .assert_called_once ()
903904 self .widget .commit .assert_called_once ()
904905
@@ -907,7 +908,7 @@ def test_plot_once(self, timeout=DEFAULT_TIMEOUT):
907908 self .assertTrue (spy .wait (timeout ))
908909
909910 self .widget .commit .reset_mock ()
910- self .send_signal (self .widget .Inputs .data_subset , self . data [::10 ])
911+ self .send_signal (self .widget .Inputs .data_subset , table [::10 ])
911912 self .widget .setup_plot .assert_called_once ()
912913 self .widget .commit .assert_called_once ()
913914
Original file line number Diff line number Diff line change @@ -420,9 +420,11 @@ def set_data(self, data):
420420 if not same_domain :
421421 self .init_attr_values ()
422422 self .openContext (self .data )
423- self .__invalidated = not (data_existed and self .data is not None and
424- np .array_equal (effective_data .X ,
425- self .effective_data .X ))
423+ self .__invalidated = not (
424+ data_existed and self .data is not None and
425+ effective_data .X .shape == self .effective_data .X .shape and
426+ np .allclose (effective_data .X ,
427+ self .effective_data .X , equal_nan = True ))
426428 if self .__invalidated :
427429 self .clear ()
428430 self .cb_class_density .setEnabled (self .can_draw_density ())
You can’t perform that action at this time.
0 commit comments