diff --git a/Orange/canvas/application/application.py b/Orange/canvas/application/application.py index f826ccf1c26..a893f73714b 100644 --- a/Orange/canvas/application/application.py +++ b/Orange/canvas/application/application.py @@ -15,6 +15,7 @@ def __init__(self, argv): if hasattr(Qt, "AA_EnableHighDpiScaling"): # Turn on HighDPI support when available QApplication.setAttribute(Qt.AA_EnableHighDpiScaling) + QApplication.__init__(self, argv) self.setAttribute(Qt.AA_DontShowIconsInMenus, True) diff --git a/Orange/data/table.py b/Orange/data/table.py index c8492fbd456..7bd7c5a294f 100644 --- a/Orange/data/table.py +++ b/Orange/data/table.py @@ -465,7 +465,7 @@ def from_table_rows(cls, source, row_indices): return self @classmethod - def from_numpy(cls, domain, X, Y=None, metas=None, W=None): + def from_numpy(cls, domain, X, Y=None, metas=None, W=None, data_attributes=None): """ Construct a table from numpy arrays with the given domain. The number of variables in the domain must match the number of columns in the @@ -482,6 +482,8 @@ def from_numpy(cls, domain, X, Y=None, metas=None, W=None): :type metas: np.array :param W: array with weights :type W: np.array + :param data_attributes: dictionary of data attributes + :type data_attributes: OrderedDict :return: """ X, Y, W = _check_arrays(X, Y, W, dtype='float64') @@ -532,7 +534,7 @@ def from_numpy(cls, domain, X, Y=None, metas=None, W=None): self.W = W self.n_rows = self.X.shape[0] cls._init_ids(self) - self.attributes = {} + self.attributes = data_attributes return self @classmethod diff --git a/Orange/widgets/data/owmergedata.py b/Orange/widgets/data/owmergedata.py index eb276976a61..ab3a35e02d0 100644 --- a/Orange/widgets/data/owmergedata.py +++ b/Orange/widgets/data/owmergedata.py @@ -369,7 +369,7 @@ def _join_table_by_indices(self, reduced_extra, indices): string_cols = [i for i, var in enumerate(domain.metas) if var.is_string] metas = self._join_array_by_indices( self.data.metas, reduced_extra.metas, indices, string_cols) - return Orange.data.Table.from_numpy(domain, X, Y, metas) + return Orange.data.Table.from_numpy(domain, X, Y, metas, data_attributes = getattr(self.data, "attributes")) @staticmethod def _join_array_by_indices(left, right, indices, string_cols=None):