File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 73
73
again. This makes for an odd behavior but at least cleans up the program properly (closes :editor_issue:`231 `).
74
74
75
75
* when save command history fails, do not do so silently. Closes :editor_issue:`225`.
76
+
77
+ * fixed compare() background color being red for two equal integer arrays instead of white
78
+ (closes :editor_issue:`246 `).
Original file line number Diff line number Diff line change @@ -139,11 +139,13 @@ def update_isequal(self):
139
139
# scale reldiff to range 0-1 with 0.5 for reldiff = 0
140
140
self .bg_value = (reldiff / maxabsreldiff ) / 2 + 0.5
141
141
else :
142
- self .bg_value = la .full_like (self .array , 0.5 )
142
+ # do NOT use full_like as we don't want to inherit array dtype
143
+ self .bg_value = la .full (self .array .axes , 0.5 )
143
144
except TypeError :
144
145
# str/object array
145
146
maxabsreldiff = la .nan
146
- self .bg_value = la .full_like (self .array , 0.5 )
147
+ # do NOT use full_like as we don't want to inherit array dtype
148
+ self .bg_value = la .full (self .array .axes , 0.5 )
147
149
148
150
self .maxdiff_label .setText (str (maxabsreldiff ))
149
151
self .display (self .diff_checkbox .isChecked ())
You can’t perform that action at this time.
0 commit comments