# Buggy code
def __init__(
    self, data, format="%.6g", xlabels=None, ylabels=None, readonly=False, parent=None
):
    QAbstractTableModel.__init__(self)

    self.dialog = parent
    self.changes = {}
    self.xlabels = xlabels
    self.ylabels = ylabels
    self.readonly = readonly
    self.test_array = np.array([0], dtype=data.dtype)

    # for complex numbers, shading will be based on absolute value
    # but for all other types it will be the real part
    if data.dtype in (np.complex64, np.complex128):
        self.color_func = np.abs
    else:
        self.color_func = np.real

    # Backgroundcolor settings
    huerange = [0.66, 0.99]  # Hue
    self.sat = 0.7  # Saturation
    self.val = 1.0  # Value
    self.alp = 0.6  # Alpha-channel

    self._data = data
    self._format = format

    self.total_rows = self._data.shape[0]
    self.total_cols = self._data.shape[1]
    size = self.total_rows * self.total_cols

    try:
        self.vmin = np.nanmin(self.color_func(data))
        self.vmax = np.nanmax(self.color_func(data))
        if self.vmax == self.vmin:
            self.vmin -= 1
        self.hue0 = huerange[0]
        self.dhue = huerange[1] - huerange[0]
        self.bgcolor_enabled = True
    except (TypeError, ValueError):
        self.vmin = None
        self.vmax = None
        self.hue0 = None
        self.dhue = None
        self.bgcolor_enabled = False

    # Use paging when the total size, number of rows or number of
    # columns is too large
    if size > LARGE_SIZE:
        self.rows_loaded = self.ROWS_TO_LOAD
        self.cols_loaded = self.COLS_TO_LOAD
    else:
        if self.total_rows > LARGE_NROWS:
            self.rows_loaded = self.ROWS_TO_LOAD
        else:
            self.rows_loaded = self.total_rows
        if self.total_cols > LARGE_COLS:
            self.cols_loaded = self.COLS_TO_LOAD
        else:
            self.cols_loaded = self.total_cols


# Traceback (ValueError)
File "C:\Users\C. A. M. Gerlach\Documents\dev\SpyderDev\spyder\spyder\plugins\variableexplorer\widgets\arrayeditor.py", line 279, in data
/ (float(self.vmax) - self.vmin))
ValueError: could not convert string to float: 'fsd'

# Fixed code
def __init__(
    self, data, format="%.6g", xlabels=None, ylabels=None, readonly=False, parent=None
):
    QAbstractTableModel.__init__(self)

    self.dialog = parent
    self.changes = {}
    self.xlabels = xlabels
    self.ylabels = ylabels
    self.readonly = readonly
    self.test_array = np.array([0], dtype=data.dtype)

    # for complex numbers, shading will be based on absolute value
    # but for all other types it will be the real part
    if data.dtype in (np.complex64, np.complex128):
        self.color_func = np.abs
    else:
        self.color_func = np.real

    # Backgroundcolor settings
    huerange = [0.66, 0.99]  # Hue
    self.sat = 0.7  # Saturation
    self.val = 1.0  # Value
    self.alp = 0.6  # Alpha-channel

    self._data = data
    self._format = format

    self.total_rows = self._data.shape[0]
    self.total_cols = self._data.shape[1]
    size = self.total_rows * self.total_cols

    try:
        self.vmin = np.nanmin(self.color_func(data))
        self.vmax = np.nanmax(self.color_func(data))
        if self.vmax == self.vmin:
            self.vmin -= 1
        self.hue0 = huerange[0]
        self.dhue = huerange[1] - huerange[0]
        self.bgcolor_enabled = True
    except (TypeError, ValueError):
        self.vmin = None
        self.vmax = None
        self.hue0 = None
        self.dhue = None
        self.bgcolor_enabled = False

    # Deactivate coloring for object arrays
    if self._data.dtype.name == "object":
        self.bgcolor_enabled = False

    # Use paging when the total size, number of rows or number of
    # columns is too large
    if size > LARGE_SIZE:
        self.rows_loaded = self.ROWS_TO_LOAD
        self.cols_loaded = self.COLS_TO_LOAD
    else:
        if self.total_rows > LARGE_NROWS:
            self.rows_loaded = self.ROWS_TO_LOAD
        else:
            self.rows_loaded = self.total_rows
        if self.total_cols > LARGE_COLS:
            self.cols_loaded = self.COLS_TO_LOAD
        else:
            self.cols_loaded = self.total_cols