We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99a8c93 commit 959fa6eCopy full SHA for 959fa6e
larray_editor/arraymodel.py
@@ -259,6 +259,11 @@ def reset_minmax(self):
259
try:
260
data = self.get_values(sample=True)
261
color_value = self.color_func(data) if self.color_func is not None else data
262
+ if color_value.dtype.type == np.object_:
263
+ color_value = color_value[is_number_value(color_value)]
264
+ # this is probably broken if we have complex numbers stored as objects but I don't foresee
265
+ # this case happening anytime soon.
266
+ color_value = color_value.astype(float)
267
# ignore nan, -inf, inf (setting them to 0 or to very large numbers is not an option)
268
color_value = color_value[np.isfinite(color_value)]
269
self.vmin = float(np.min(color_value))
0 commit comments