{
    "file_diffs": [
        {
            "old_file_content": "import numpy as np\n\nfrom Orange.data import Domain, ContinuousVariable\nfrom Orange.statistics import distribution\nfrom Orange.util import Reprable\nfrom .preprocess import Normalize\nfrom .transformation import Normalizer as Norm\n__all__ = [\"Normalizer\"]\n\n\nclass Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n",
            "new_file_content": "import numpy as np\n\nfrom Orange.data import Domain, ContinuousVariable\nfrom Orange.statistics import distribution\nfrom Orange.util import Reprable\nfrom .preprocess import Normalize\nfrom .transformation import Normalizer as Norm\n__all__ = [\"Normalizer\"]\n\n\nclass Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n\n        # When dealing with integers, and multiplying by something smaller than\n        # 1, the number of decimals should be decreased, but this integer will\n        # likely turn into a float, which should have some default number of\n        # decimals\n        num_decimals = var.number_of_decimals + int(np.round(np.log10(sd)))\n        num_decimals = max(num_decimals, 1)  # num decimals can't be negative\n\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        if not np.isnan(diff):\n            num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n            num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n            return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n        else:\n            return var.copy(compute_value=compute_val)\n",
            "header": {
                "file": {
                    "path": "Orange/preprocess/normalize.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "23ec66560",
                "new_commit_hash": "83868ee5d",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/preprocess/normalize.py"
            },
            "plus_file": {
                "path": "b/Orange/preprocess/normalize.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 52,
                            "length": 8
                        },
                        "new_range": {
                            "start": 52,
                            "length": 14
                        },
                        "section": "class Normalizer(Reprable):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "            compute_val = Norm(var, avg, 1 / sd)",
                                "type": "context"
                            },
                            {
                                "content": "        else:",
                                "type": "context"
                            },
                            {
                                "content": "            compute_val = Norm(var, 0, 1 / sd)",
                                "type": "context"
                            },
                            {
                                "content": "        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))",
                                "type": "deleted"
                            },
                            {
                                "content": "        num_decimals = max(num_decimals, 0)  # num decimals can't be negative",
                                "type": "deleted"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "        # When dealing with integers, and multiplying by something smaller than",
                                "type": "added"
                            },
                            {
                                "content": "        # 1, the number of decimals should be decreased, but this integer will",
                                "type": "added"
                            },
                            {
                                "content": "        # likely turn into a float, which should have some default number of",
                                "type": "added"
                            },
                            {
                                "content": "        # decimals",
                                "type": "added"
                            },
                            {
                                "content": "        num_decimals = var.number_of_decimals + int(np.round(np.log10(sd)))",
                                "type": "added"
                            },
                            {
                                "content": "        num_decimals = max(num_decimals, 1)  # num decimals can't be negative",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/preprocess/normalize.py",
                            "type": "class",
                            "name": "Normalizer",
                            "content": "class Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 11,
                            "end_lineno": 70,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/preprocess/normalize.py",
                            "type": "method",
                            "name": "Normalizer.normalize_by_sd",
                            "content": "class Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 47,
                            "end_lineno": 57,
                            "parent": {
                                "file_name": "Orange/preprocess/normalize.py",
                                "type": "class",
                                "name": "Normalizer",
                                "content": "class Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 11,
                                "end_lineno": 70,
                                "parent": null
                            }
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                },
                {
                    "descriptor": {
                        "old_range": {
                            "start": 65,
                            "length": 6
                        },
                        "new_range": {
                            "start": 71,
                            "length": 9
                        },
                        "section": "class Normalizer(Reprable):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "            compute_val = Norm(var, dmi, 1 / diff)",
                                "type": "context"
                            },
                            {
                                "content": "        else:",
                                "type": "context"
                            },
                            {
                                "content": "            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)",
                                "type": "context"
                            },
                            {
                                "content": "        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))",
                                "type": "deleted"
                            },
                            {
                                "content": "        num_decimals = max(num_decimals, 0)  # num decimals can't be negative",
                                "type": "deleted"
                            },
                            {
                                "content": "        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                                "type": "deleted"
                            },
                            {
                                "content": "        if not np.isnan(diff):",
                                "type": "added"
                            },
                            {
                                "content": "            num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))",
                                "type": "added"
                            },
                            {
                                "content": "            num_decimals = max(num_decimals, 0)  # num decimals can't be negative",
                                "type": "added"
                            },
                            {
                                "content": "            return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                                "type": "added"
                            },
                            {
                                "content": "        else:",
                                "type": "added"
                            },
                            {
                                "content": "            return var.copy(compute_value=compute_val)",
                                "type": "added"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/preprocess/normalize.py",
                            "type": "class",
                            "name": "Normalizer",
                            "content": "class Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 11,
                            "end_lineno": 70,
                            "parent": null
                        },
                        {
                            "file_name": "Orange/preprocess/normalize.py",
                            "type": "method",
                            "name": "Normalizer.normalize_by_span",
                            "content": "class Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 59,
                            "end_lineno": 70,
                            "parent": {
                                "file_name": "Orange/preprocess/normalize.py",
                                "type": "class",
                                "name": "Normalizer",
                                "content": "class Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 11,
                                "end_lineno": 70,
                                "parent": null
                            }
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                }
            ]
        },
        {
            "old_file_content": "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring\n\nimport unittest\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom Orange.data import Table, Domain, ContinuousVariable\nfrom Orange.preprocess import Normalize\nfrom Orange.tests import test_filename\n\n\nclass TestNormalizer(unittest.TestCase):\n    def compare_tables(self, dataNorm, solution):\n        for i in range(len(dataNorm)):\n            for j in range(len(dataNorm[i])):\n                if type(solution[i][j]) == float:\n                    self.assertAlmostEqual(dataNorm[i, j], solution[i][j], places=3)\n                else:\n                    self.assertEqual(dataNorm[i, j], solution[i][j])\n        self.assertEqual([attr.name for attr in dataNorm.domain.attributes],\n                         [\"c1\", \"c2\", \"d1\", \"d2\", \"n1\", \"n2\", \"c3\", \"d3\", \"c4\"])\n        self.assertEqual([attr.name for attr in dataNorm.domain.class_vars],\n                         [\"cl1\", \"cl2\"])\n    @classmethod\n    def setUpClass(cls):\n        cls.data = Table(test_filename(\"datasets/test5.tab\"))\n\n    def test_normalize_default(self):\n        normalizer = Normalize()\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_sd(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 1.225],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.225],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_class(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 0.5]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_sparse(self):\n        domain = Domain([ContinuousVariable(str(i)) for i in range(3)])\n        # pylint: disable=bad-whitespace\n        X = np.array([\n            [0, -1, -2],\n            [0,  1,  2],\n        ])\n        data = Table.from_numpy(domain, X).to_sparse()\n\n        # pylint: disable=bad-whitespace\n        solution = sp.csr_matrix(np.array([\n            [0, -1, -1],\n            [0,  1,  1],\n        ]))\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        self.assertEqual((normalized.X != solution).nnz, 0)\n\n        # raise error for non-zero offsets\n        data.X = sp.csr_matrix(np.array([\n            [0, 0, 0],\n            [0, 1, 3],\n            [0, 2, 4],\n        ]))\n        with self.assertRaises(ValueError):\n            normalizer(data)\n\n    def test_skip_normalization(self):\n        data = self.data.copy()\n        for attr in data.domain.attributes:\n            attr.attributes = {'skip-normalization': True}\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        np.testing.assert_array_equal(data.X, normalized.X)\n\n    def test_datetime_normalization(self):\n        data = Table(test_filename(\"datasets/test10.tab\"))\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(data)\n        solution = [[0., '1995-01-21', 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., '2003-07-23', 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., '1967-03-12', 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_retain_vars_attributes(self):\n        data = Table(\"iris\")\n        attributes = {\"foo\": \"foo\", \"baz\": 1}\n        data.domain.attributes[0].attributes = attributes\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySD)(\n                data).domain.attributes[0].attributes, attributes)\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySpan)(\n                data).domain.attributes[0].attributes, attributes)\n\n    def test_number_of_decimals(self):\n        foo = ContinuousVariable(\"Foo\", number_of_decimals=0)\n        data = Table.from_list(Domain((foo,)), [[1], [2], [3]])\n\n        normalized = Normalize()(data)\n        norm_foo = normalized.domain.attributes[0]\n\n        self.assertEqual(norm_foo.number_of_decimals, 3)\n        self.assertEqual(norm_foo.format_str, \"%g\")\n        self.assertEqual(norm_foo.adjust_decimals, 2)\n\n        for val1, val2 in zip(normalized[:, \"Foo\"],\n                              [\"-1.22474\", \"0\", \"1.22474\"]):\n            self.assertEqual(str(val1[0]), val2)\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n",
            "new_file_content": "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring\n\nimport unittest\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom Orange.data import Table, Domain, ContinuousVariable\nfrom Orange.preprocess import Normalize\nfrom Orange.tests import test_filename\n\n\nclass TestNormalizer(unittest.TestCase):\n    def compare_tables(self, dataNorm, solution):\n        for i in range(len(dataNorm)):\n            for j in range(len(dataNorm[i])):\n                if type(solution[i][j]) == float:\n                    self.assertAlmostEqual(dataNorm[i, j], solution[i][j], places=3)\n                else:\n                    self.assertEqual(dataNorm[i, j], solution[i][j])\n        self.assertEqual([attr.name for attr in dataNorm.domain.attributes],\n                         [\"c1\", \"c2\", \"d1\", \"d2\", \"n1\", \"n2\", \"c3\", \"d3\", \"c4\"])\n        self.assertEqual([attr.name for attr in dataNorm.domain.class_vars],\n                         [\"cl1\", \"cl2\"])\n    @classmethod\n    def setUpClass(cls):\n        cls.data = Table(test_filename(\"datasets/test5.tab\"))\n\n    def test_normalize_default(self):\n        normalizer = Normalize()\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_sd(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 1.225],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.225],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_class(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 0.5]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_sparse(self):\n        domain = Domain([ContinuousVariable(str(i)) for i in range(3)])\n        # pylint: disable=bad-whitespace\n        X = np.array([\n            [0, -1, -2],\n            [0,  1,  2],\n        ])\n        data = Table.from_numpy(domain, X).to_sparse()\n\n        # pylint: disable=bad-whitespace\n        solution = sp.csr_matrix(np.array([\n            [0, -1, -1],\n            [0,  1,  1],\n        ]))\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        self.assertEqual((normalized.X != solution).nnz, 0)\n\n        # raise error for non-zero offsets\n        data.X = sp.csr_matrix(np.array([\n            [0, 0, 0],\n            [0, 1, 3],\n            [0, 2, 4],\n        ]))\n        with self.assertRaises(ValueError):\n            normalizer(data)\n\n    def test_skip_normalization(self):\n        data = self.data.copy()\n        for attr in data.domain.attributes:\n            attr.attributes = {'skip-normalization': True}\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        np.testing.assert_array_equal(data.X, normalized.X)\n\n    def test_datetime_normalization(self):\n        data = Table(test_filename(\"datasets/test10.tab\"))\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(data)\n        solution = [[0., '1995-01-21', 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., '2003-07-23', 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., '1967-03-12', 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_retain_vars_attributes(self):\n        data = Table(\"iris\")\n        attributes = {\"foo\": \"foo\", \"baz\": 1}\n        data.domain.attributes[0].attributes = attributes\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySD)(\n                data).domain.attributes[0].attributes, attributes)\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySpan)(\n                data).domain.attributes[0].attributes, attributes)\n\n    def test_number_of_decimals(self):\n        foo = ContinuousVariable(\"Foo\", number_of_decimals=0)\n        data = Table.from_list(Domain((foo,)), [[1], [2], [3]])\n\n        normalized = Normalize()(data)\n        norm_foo: ContinuousVariable = normalized.domain.attributes[0]\n\n        self.assertGreater(norm_foo.number_of_decimals, 0)\n\n        for val1, val2 in zip(normalized[:, \"Foo\"],\n                              [\"-1.225\", \"0.0\", \"1.225\"]):\n            self.assertEqual(str(val1[0]), val2)\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n",
            "header": {
                "file": {
                    "path": "Orange/tests/test_normalize.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "84c38d6dc",
                "new_commit_hash": "d58e9daae",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/tests/test_normalize.py"
            },
            "plus_file": {
                "path": "b/Orange/tests/test_normalize.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 159,
                            "length": 14
                        },
                        "new_range": {
                            "start": 159,
                            "length": 12
                        },
                        "section": "class TestNormalizer(unittest.TestCase):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "        data = Table.from_list(Domain((foo,)), [[1], [2], [3]])",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "        normalized = Normalize()(data)",
                                "type": "context"
                            },
                            {
                                "content": "        norm_foo = normalized.domain.attributes[0]",
                                "type": "deleted"
                            },
                            {
                                "content": "        norm_foo: ContinuousVariable = normalized.domain.attributes[0]",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(norm_foo.number_of_decimals, 3)",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(norm_foo.format_str, \"%g\")",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertEqual(norm_foo.adjust_decimals, 2)",
                                "type": "deleted"
                            },
                            {
                                "content": "        self.assertGreater(norm_foo.number_of_decimals, 0)",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "        for val1, val2 in zip(normalized[:, \"Foo\"],",
                                "type": "context"
                            },
                            {
                                "content": "                              [\"-1.22474\", \"0\", \"1.22474\"]):",
                                "type": "deleted"
                            },
                            {
                                "content": "                              [\"-1.225\", \"0.0\", \"1.225\"]):",
                                "type": "added"
                            },
                            {
                                "content": "            self.assertEqual(str(val1[0]), val2)",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/tests/test_normalize.py",
                            "type": "method",
                            "name": "TestNormalizer.test_number_of_decimals",
                            "content": "class TestNormalizer(unittest.TestCase):\n    def compare_tables(self, dataNorm, solution):\n        for i in range(len(dataNorm)):\n            for j in range(len(dataNorm[i])):\n                if type(solution[i][j]) == float:\n                    self.assertAlmostEqual(dataNorm[i, j], solution[i][j], places=3)\n                else:\n                    self.assertEqual(dataNorm[i, j], solution[i][j])\n        self.assertEqual([attr.name for attr in dataNorm.domain.attributes],\n                         [\"c1\", \"c2\", \"d1\", \"d2\", \"n1\", \"n2\", \"c3\", \"d3\", \"c4\"])\n        self.assertEqual([attr.name for attr in dataNorm.domain.class_vars],\n                         [\"cl1\", \"cl2\"])\n    @classmethod\n    def setUpClass(cls):\n        cls.data = Table(test_filename(\"datasets/test5.tab\"))\n\n    def test_normalize_default(self):\n        normalizer = Normalize()\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_sd(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 1.225],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.225],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_class(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 0.5]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_sparse(self):\n        domain = Domain([ContinuousVariable(str(i)) for i in range(3)])\n        # pylint: disable=bad-whitespace\n        X = np.array([\n            [0, -1, -2],\n            [0,  1,  2],\n        ])\n        data = Table.from_numpy(domain, X).to_sparse()\n\n        # pylint: disable=bad-whitespace\n        solution = sp.csr_matrix(np.array([\n            [0, -1, -1],\n            [0,  1,  1],\n        ]))\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        self.assertEqual((normalized.X != solution).nnz, 0)\n\n        # raise error for non-zero offsets\n        data.X = sp.csr_matrix(np.array([\n            [0, 0, 0],\n            [0, 1, 3],\n            [0, 2, 4],\n        ]))\n        with self.assertRaises(ValueError):\n            normalizer(data)\n\n    def test_skip_normalization(self):\n        data = self.data.copy()\n        for attr in data.domain.attributes:\n            attr.attributes = {'skip-normalization': True}\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        np.testing.assert_array_equal(data.X, normalized.X)\n\n    def test_datetime_normalization(self):\n        data = Table(test_filename(\"datasets/test10.tab\"))\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(data)\n        solution = [[0., '1995-01-21', 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., '2003-07-23', 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., '1967-03-12', 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_retain_vars_attributes(self):\n        data = Table(\"iris\")\n        attributes = {\"foo\": \"foo\", \"baz\": 1}\n        data.domain.attributes[0].attributes = attributes\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySD)(\n                data).domain.attributes[0].attributes, attributes)\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySpan)(\n                data).domain.attributes[0].attributes, attributes)\n\n    def test_number_of_decimals(self):\n        foo = ContinuousVariable(\"Foo\", number_of_decimals=0)\n        data = Table.from_list(Domain((foo,)), [[1], [2], [3]])\n\n        normalized = Normalize()(data)\n        norm_foo = normalized.domain.attributes[0]\n\n        self.assertEqual(norm_foo.number_of_decimals, 3)\n        self.assertEqual(norm_foo.format_str, \"%g\")\n        self.assertEqual(norm_foo.adjust_decimals, 2)\n\n        for val1, val2 in zip(normalized[:, \"Foo\"],\n                              [\"-1.22474\", \"0\", \"1.22474\"]):\n            self.assertEqual(str(val1[0]), val2)",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 157,
                            "end_lineno": 170,
                            "parent": {
                                "file_name": "Orange/tests/test_normalize.py",
                                "type": "class",
                                "name": "TestNormalizer",
                                "content": "class TestNormalizer(unittest.TestCase):\n    def compare_tables(self, dataNorm, solution):\n        for i in range(len(dataNorm)):\n            for j in range(len(dataNorm[i])):\n                if type(solution[i][j]) == float:\n                    self.assertAlmostEqual(dataNorm[i, j], solution[i][j], places=3)\n                else:\n                    self.assertEqual(dataNorm[i, j], solution[i][j])\n        self.assertEqual([attr.name for attr in dataNorm.domain.attributes],\n                         [\"c1\", \"c2\", \"d1\", \"d2\", \"n1\", \"n2\", \"c3\", \"d3\", \"c4\"])\n        self.assertEqual([attr.name for attr in dataNorm.domain.class_vars],\n                         [\"cl1\", \"cl2\"])\n    @classmethod\n    def setUpClass(cls):\n        cls.data = Table(test_filename(\"datasets/test5.tab\"))\n\n    def test_normalize_default(self):\n        normalizer = Normalize()\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_sd(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 1.225],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.225],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_class(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 0.5]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_sparse(self):\n        domain = Domain([ContinuousVariable(str(i)) for i in range(3)])\n        # pylint: disable=bad-whitespace\n        X = np.array([\n            [0, -1, -2],\n            [0,  1,  2],\n        ])\n        data = Table.from_numpy(domain, X).to_sparse()\n\n        # pylint: disable=bad-whitespace\n        solution = sp.csr_matrix(np.array([\n            [0, -1, -1],\n            [0,  1,  1],\n        ]))\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        self.assertEqual((normalized.X != solution).nnz, 0)\n\n        # raise error for non-zero offsets\n        data.X = sp.csr_matrix(np.array([\n            [0, 0, 0],\n            [0, 1, 3],\n            [0, 2, 4],\n        ]))\n        with self.assertRaises(ValueError):\n            normalizer(data)\n\n    def test_skip_normalization(self):\n        data = self.data.copy()\n        for attr in data.domain.attributes:\n            attr.attributes = {'skip-normalization': True}\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        np.testing.assert_array_equal(data.X, normalized.X)\n\n    def test_datetime_normalization(self):\n        data = Table(test_filename(\"datasets/test10.tab\"))\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(data)\n        solution = [[0., '1995-01-21', 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., '2003-07-23', 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., '1967-03-12', 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_retain_vars_attributes(self):\n        data = Table(\"iris\")\n        attributes = {\"foo\": \"foo\", \"baz\": 1}\n        data.domain.attributes[0].attributes = attributes\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySD)(\n                data).domain.attributes[0].attributes, attributes)\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySpan)(\n                data).domain.attributes[0].attributes, attributes)\n\n    def test_number_of_decimals(self):\n        foo = ContinuousVariable(\"Foo\", number_of_decimals=0)\n        data = Table.from_list(Domain((foo,)), [[1], [2], [3]])\n\n        normalized = Normalize()(data)\n        norm_foo = normalized.domain.attributes[0]\n\n        self.assertEqual(norm_foo.number_of_decimals, 3)\n        self.assertEqual(norm_foo.format_str, \"%g\")\n        self.assertEqual(norm_foo.adjust_decimals, 2)\n\n        for val1, val2 in zip(normalized[:, \"Foo\"],\n                              [\"-1.22474\", \"0\", \"1.22474\"]):\n            self.assertEqual(str(val1[0]), val2)",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 14,
                                "end_lineno": 170,
                                "parent": null
                            }
                        },
                        {
                            "file_name": "Orange/tests/test_normalize.py",
                            "type": "class",
                            "name": "TestNormalizer",
                            "content": "class TestNormalizer(unittest.TestCase):\n    def compare_tables(self, dataNorm, solution):\n        for i in range(len(dataNorm)):\n            for j in range(len(dataNorm[i])):\n                if type(solution[i][j]) == float:\n                    self.assertAlmostEqual(dataNorm[i, j], solution[i][j], places=3)\n                else:\n                    self.assertEqual(dataNorm[i, j], solution[i][j])\n        self.assertEqual([attr.name for attr in dataNorm.domain.attributes],\n                         [\"c1\", \"c2\", \"d1\", \"d2\", \"n1\", \"n2\", \"c3\", \"d3\", \"c4\"])\n        self.assertEqual([attr.name for attr in dataNorm.domain.class_vars],\n                         [\"cl1\", \"cl2\"])\n    @classmethod\n    def setUpClass(cls):\n        cls.data = Table(test_filename(\"datasets/test5.tab\"))\n\n    def test_normalize_default(self):\n        normalizer = Normalize()\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_sd(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 1.225],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.225],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_class(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 0.5]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_sparse(self):\n        domain = Domain([ContinuousVariable(str(i)) for i in range(3)])\n        # pylint: disable=bad-whitespace\n        X = np.array([\n            [0, -1, -2],\n            [0,  1,  2],\n        ])\n        data = Table.from_numpy(domain, X).to_sparse()\n\n        # pylint: disable=bad-whitespace\n        solution = sp.csr_matrix(np.array([\n            [0, -1, -1],\n            [0,  1,  1],\n        ]))\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        self.assertEqual((normalized.X != solution).nnz, 0)\n\n        # raise error for non-zero offsets\n        data.X = sp.csr_matrix(np.array([\n            [0, 0, 0],\n            [0, 1, 3],\n            [0, 2, 4],\n        ]))\n        with self.assertRaises(ValueError):\n            normalizer(data)\n\n    def test_skip_normalization(self):\n        data = self.data.copy()\n        for attr in data.domain.attributes:\n            attr.attributes = {'skip-normalization': True}\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        np.testing.assert_array_equal(data.X, normalized.X)\n\n    def test_datetime_normalization(self):\n        data = Table(test_filename(\"datasets/test10.tab\"))\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(data)\n        solution = [[0., '1995-01-21', 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., '2003-07-23', 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., '1967-03-12', 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_retain_vars_attributes(self):\n        data = Table(\"iris\")\n        attributes = {\"foo\": \"foo\", \"baz\": 1}\n        data.domain.attributes[0].attributes = attributes\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySD)(\n                data).domain.attributes[0].attributes, attributes)\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySpan)(\n                data).domain.attributes[0].attributes, attributes)\n\n    def test_number_of_decimals(self):\n        foo = ContinuousVariable(\"Foo\", number_of_decimals=0)\n        data = Table.from_list(Domain((foo,)), [[1], [2], [3]])\n\n        normalized = Normalize()(data)\n        norm_foo = normalized.domain.attributes[0]\n\n        self.assertEqual(norm_foo.number_of_decimals, 3)\n        self.assertEqual(norm_foo.format_str, \"%g\")\n        self.assertEqual(norm_foo.adjust_decimals, 2)\n\n        for val1, val2 in zip(normalized[:, \"Foo\"],\n                              [\"-1.22474\", \"0\", \"1.22474\"]):\n            self.assertEqual(str(val1[0]), val2)",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 14,
                            "end_lineno": 170,
                            "parent": null
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                }
            ]
        }
    ],
    "old_commit_hash": "f7ff577a4b2b94719c53eb37d63191c0f683a286^",
    "new_commit_hash": "f7ff577a4b2b94719c53eb37d63191c0f683a286",
    "commit_message": "normalize: Fix failing tests due to decimals",
    "commit_date": "2020-06-19T13:48:26+02:00",
    "metadata": {}
}
{
    "repo_name": "orange3",
    "new_commit_hash": "f7ff577a4b2b94719c53eb37d63191c0f683a286",
    "test_file_codes": [
        "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring\n\nimport unittest\n\nimport numpy as np\nimport scipy.sparse as sp\n\nfrom Orange.data import Table, Domain, ContinuousVariable\nfrom Orange.preprocess import Normalize\nfrom Orange.tests import test_filename\n\n\nclass TestNormalizer(unittest.TestCase):\n    def compare_tables(self, dataNorm, solution):\n        for i in range(len(dataNorm)):\n            for j in range(len(dataNorm[i])):\n                if type(solution[i][j]) == float:\n                    self.assertAlmostEqual(dataNorm[i, j], solution[i][j], places=3)\n                else:\n                    self.assertEqual(dataNorm[i, j], solution[i][j])\n        self.assertEqual([attr.name for attr in dataNorm.domain.attributes],\n                         [\"c1\", \"c2\", \"d1\", \"d2\", \"n1\", \"n2\", \"c3\", \"d3\", \"c4\"])\n        self.assertEqual([attr.name for attr in dataNorm.domain.class_vars],\n                         [\"cl1\", \"cl2\"])\n    @classmethod\n    def setUpClass(cls):\n        cls.data = Table(test_filename(\"datasets/test5.tab\"))\n\n    def test_normalize_default(self):\n        normalizer = Normalize()\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_sd(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1.225, 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 1.225],\n                    [0., -1.225, 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.225],\n                    [0., 0., 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 2.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 1.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_class(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., -1., 'a', 'b', -1., '?', 0., 'b', '?', 'b', -1.],\n                    [0., 0., 'a', 'b', 1., 'b', -1., 'c', '?', 'c', 0.]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_transform_by_span_zero_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n        data_norm = normalizer(self.data)\n        solution = [[0., 1., 'a', 'a', '?', 'a', 1., 'a', '?', 'a', 1.],\n                    [0., 0., 'a', 'b', 0., '?', 0.5, 'b', '?', 'b', 0.],\n                    [0., 0.5, 'a', 'b', 1., 'b', 0., 'c', '?', 'c', 0.5]]\n        self.compare_tables(data_norm, solution)\n\n    def test_normalize_sparse(self):\n        domain = Domain([ContinuousVariable(str(i)) for i in range(3)])\n        # pylint: disable=bad-whitespace\n        X = np.array([\n            [0, -1, -2],\n            [0,  1,  2],\n        ])\n        data = Table.from_numpy(domain, X).to_sparse()\n\n        # pylint: disable=bad-whitespace\n        solution = sp.csr_matrix(np.array([\n            [0, -1, -1],\n            [0,  1,  1],\n        ]))\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        self.assertEqual((normalized.X != solution).nnz, 0)\n\n        # raise error for non-zero offsets\n        data.X = sp.csr_matrix(np.array([\n            [0, 0, 0],\n            [0, 1, 3],\n            [0, 2, 4],\n        ]))\n        with self.assertRaises(ValueError):\n            normalizer(data)\n\n    def test_skip_normalization(self):\n        data = self.data.copy()\n        for attr in data.domain.attributes:\n            attr.attributes = {'skip-normalization': True}\n\n        normalizer = Normalize()\n        normalized = normalizer(data)\n        np.testing.assert_array_equal(data.X, normalized.X)\n\n    def test_datetime_normalization(self):\n        data = Table(test_filename(\"datasets/test10.tab\"))\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySD,\n                               transform_class=False)\n        data_norm = normalizer(data)\n        solution = [[0., '1995-01-21', 'a', 'a', '?', 'a', 1.225, 'a', '?', 'a', 2],\n                    [0., '2003-07-23', 'a', 'b', -1., '?', 0., 'b', '?', 'b', 0],\n                    [0., '1967-03-12', 'a', 'b', 1., 'b', -1.225, 'c', '?', 'c', 1]]\n        self.compare_tables(data_norm, solution)\n\n    def test_retain_vars_attributes(self):\n        data = Table(\"iris\")\n        attributes = {\"foo\": \"foo\", \"baz\": 1}\n        data.domain.attributes[0].attributes = attributes\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySD)(\n                data).domain.attributes[0].attributes, attributes)\n        self.assertDictEqual(\n            Normalize(norm_type=Normalize.NormalizeBySpan)(\n                data).domain.attributes[0].attributes, attributes)\n\n    def test_number_of_decimals(self):\n        foo = ContinuousVariable(\"Foo\", number_of_decimals=0)\n        data = Table.from_list(Domain((foo,)), [[1], [2], [3]])\n\n        normalized = Normalize()(data)\n        norm_foo: ContinuousVariable = normalized.domain.attributes[0]\n\n        self.assertGreater(norm_foo.number_of_decimals, 0)\n\n        for val1, val2 in zip(normalized[:, \"Foo\"],\n                              [\"-1.225\", \"0.0\", \"1.225\"]):\n            self.assertEqual(str(val1[0]), val2)\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
    ],
    "test_file_names": [
        "test_1.py"
    ],
    "setup_res_code": 0,
    "setup_res_stdout": "Starting Orange installation attempts...\nAttempting installation with Python 3.7...\nrunning build_ext\nrunning build_src\nbuild_src\nbuilding extension \"Orange.classification._simple_tree\" sources\nbuilding extension \"Orange.classification._tree_scorers\" sources\nbuilding extension \"Orange.data._valuecount\" sources\nbuilding extension \"Orange.data._contingency\" sources\nbuilding extension \"Orange.data._io\" sources\nbuilding extension \"Orange.data._variable\" sources\nbuilding extension \"Orange.distance._distance\" sources\nbuilding extension \"Orange.preprocess._discretize\" sources\nbuilding extension \"Orange.preprocess._relieff\" sources\nbuilding extension \"Orange.projection._som\" sources\nbuilding extension \"Orange.widgets.utils._grid_density\" sources\nbuild_src: building npy-pkg config files\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmpfl38lcmf/tmp\ncreating /tmp/tmpfl38lcmf/tmp/tmpfl38lcmf\ncompile options: '-MMD -MF /tmp/tmpfl38lcmf/file.c.d -c'\ncc: /tmp/tmpfl38lcmf/file.c\ncustomize UnixCCompiler using build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmplbsj7ytx/tmp\ncreating /tmp/tmplbsj7ytx/tmp/tmplbsj7ytx\ncompile options: '-MMD -MF /tmp/tmplbsj7ytx/file.c.d -c'\ncc: /tmp/tmplbsj7ytx/file.c\ncustomize UnixCCompiler using build_ext\nbuilding 'Orange.classification._simple_tree' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange\ncreating build/temp.linux-x86_64-3.7/Orange/classification\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/classification/_simple_tree.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/classification/_simple_tree.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/classification/_simple_tree.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.classification._tree_scorers' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/classification/_tree_scorers.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/classification/_tree_scorers.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/classification/_tree_scorers.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._valuecount' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/data\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_valuecount.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_valuecount.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_valuecount.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._contingency' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_contingency.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_contingency.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_contingency.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._io' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_io.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_io.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_io.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._variable' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/data/_variable.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_variable.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/data/_variable.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.distance._distance' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/distance\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/distance/_distance.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/distance/_distance.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/distance/_distance.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._discretize' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/preprocess\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/preprocess/_discretize.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/preprocess/_discretize.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/preprocess/_discretize.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._relieff' extension\ncompiling C++ sources\nC compiler: c++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\nc++: Orange/preprocess/_relieff.cpp\nc++ -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/preprocess/_relieff.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/preprocess/_relieff.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.projection._som' extension\ncompiling C sources\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/projection\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\ncc: Orange/projection/_som.c\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/projection/_som.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/projection/_som.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.widgets.utils._grid_density' extension\ncompiling C++ sources\nC compiler: c++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating build/temp.linux-x86_64-3.7/Orange/widgets\ncreating build/temp.linux-x86_64-3.7/Orange/widgets/utils\ncompile options: '-I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c'\nc++: Orange/widgets/utils/_grid_density.cpp\nc++ -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/widgets/utils/_grid_density.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o Orange/widgets/utils/_grid_density.cpython-37m-x86_64-linux-gnu.so\nrunning develop\nrunning build_scripts\nrunning egg_info\nrunning build_src\nbuild_src\nbuilding extension \"Orange.classification._simple_tree\" sources\nbuilding extension \"Orange.classification._tree_scorers\" sources\nbuilding extension \"Orange.data._valuecount\" sources\nbuilding extension \"Orange.data._contingency\" sources\nbuilding extension \"Orange.data._io\" sources\nbuilding extension \"Orange.data._variable\" sources\nbuilding extension \"Orange.distance._distance\" sources\nbuilding extension \"Orange.preprocess._discretize\" sources\nbuilding extension \"Orange.preprocess._relieff\" sources\nbuilding extension \"Orange.projection._som\" sources\nbuilding extension \"Orange.widgets.utils._grid_density\" sources\nbuild_src: building npy-pkg config files\ncreating Orange3.egg-info\nwriting Orange3.egg-info/PKG-INFO\nwriting dependency_links to Orange3.egg-info/dependency_links.txt\nwriting entry points to Orange3.egg-info/entry_points.txt\nwriting requirements to Orange3.egg-info/requires.txt\nwriting top-level names to Orange3.egg-info/top_level.txt\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest template 'MANIFEST.in'\nwarning: no files found matching 'README*' under directory 'Orange'\nwarning: no files found matching 'LICENSE' under directory 'Orange'\nwarning: no files found matching '*.basket' under directory 'Orange/datasets'\nwarning: no files found matching '*.js' under directory 'Orange/widgets'\nwarning: no files found matching '*.css' under directory 'Orange/widgets'\nwarning: no files found matching '*.html' under directory 'Orange/widgets'\nwarning: no files found matching 'COPYING'\nadding license file 'LICENSE'\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nrunning build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmp8zhrcz3x/tmp\ncreating /tmp/tmp8zhrcz3x/tmp/tmp8zhrcz3x\ncompile options: '-MMD -MF /tmp/tmp8zhrcz3x/file.c.d -c'\ncc: /tmp/tmp8zhrcz3x/file.c\ncustomize UnixCCompiler using build_ext\ncustomize UnixCCompiler\nC compiler: cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC\n\ncreating /tmp/tmp8dhb5u00/tmp\ncreating /tmp/tmp8dhb5u00/tmp/tmp8dhb5u00\ncompile options: '-MMD -MF /tmp/tmp8dhb5u00/file.c.d -c'\ncc: /tmp/tmp8dhb5u00/file.c\ncustomize UnixCCompiler using build_ext\nCreating /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/Orange3.egg-link (link to .)\nAdding Orange3 3.26.0.dev0+f7ff577 to easy-install.pth file\nInstalling orange-canvas script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286\nProcessing dependencies for Orange3==3.26.0.dev0+f7ff577\nSearching for XlsxWriter==3.2.0\nBest match: XlsxWriter 3.2.0\nAdding XlsxWriter 3.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for xlrd==2.0.1\nBest match: xlrd 2.0.1\nAdding xlrd 2.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for setuptools==59.8.0\nBest match: setuptools 59.8.0\nAdding setuptools 59.8.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for serverfiles==0.3.1\nBest match: serverfiles 0.3.1\nAdding serverfiles 0.3.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for scipy==1.7.3\nBest match: scipy 1.7.3\nAdding scipy 1.7.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for scikit-learn==0.22.2.post1\nBest match: scikit-learn 0.22.2.post1\nAdding scikit-learn 0.22.2.post1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for requests==2.31.0\nBest match: requests 2.31.0\nAdding requests 2.31.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for PyYAML==6.0.1\nBest match: PyYAML 6.0.1\nAdding PyYAML 6.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for python-louvain==0.16\nBest match: python-louvain 0.16\nAdding python-louvain 0.16 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for pyqtgraph==0.12.4\nBest match: pyqtgraph 0.12.4\nAdding pyqtgraph 0.12.4 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for pip==24.0\nBest match: pip 24.0\nAdding pip 24.0 to easy-install.pth file\nInstalling pip script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\nInstalling pip3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\nInstalling pip3.10 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for pandas==1.3.5\nBest match: pandas 1.3.5\nAdding pandas 1.3.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for orange-widget-base==4.22.0\nBest match: orange-widget-base 4.22.0\nAdding orange-widget-base 4.22.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for orange-canvas-core==0.1.35\nBest match: orange-canvas-core 0.1.35\nAdding orange-canvas-core 0.1.35 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for openpyxl==3.1.3\nBest match: openpyxl 3.1.3\nAdding openpyxl 3.1.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for openTSNE==1.0.1\nBest match: openTSNE 1.0.1\nAdding openTSNE 1.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for numpy==1.17.5\nBest match: numpy 1.17.5\nAdding numpy 1.17.5 to easy-install.pth file\nInstalling f2py script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\nInstalling f2py3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\nInstalling f2py3.7 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for networkx==2.6.3\nBest match: networkx 2.6.3\nAdding networkx 2.6.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for matplotlib==3.5.3\nBest match: matplotlib 3.5.3\nAdding matplotlib 3.5.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for keyrings.alt==4.2.0\nBest match: keyrings.alt 4.2.0\nAdding keyrings.alt 4.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for keyring==24.1.1\nBest match: keyring 24.1.1\nAdding keyring 24.1.1 to easy-install.pth file\nInstalling keyring script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for joblib==1.3.2\nBest match: joblib 1.3.2\nAdding joblib 1.3.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for httpx==0.24.1\nBest match: httpx 0.24.1\nAdding httpx 0.24.1 to easy-install.pth file\nInstalling httpx script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for docutils==0.20.1\nBest match: docutils 0.20.1\nAdding docutils 0.20.1 to easy-install.pth file\nInstalling docutils script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for chardet==5.2.0\nBest match: chardet 5.2.0\nAdding chardet 5.2.0 to easy-install.pth file\nInstalling chardetect script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for Bottleneck==1.4.0\nBest match: Bottleneck 1.4.0\nAdding Bottleneck 1.4.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for baycomp==1.0.3\nBest match: baycomp 1.0.3\nAdding baycomp 1.0.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for AnyQt==0.2.0\nBest match: AnyQt 0.2.0\nAdding AnyQt 0.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for certifi==2024.12.14\nBest match: certifi 2024.12.14\nAdding certifi 2024.12.14 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for idna==3.10\nBest match: idna 3.10\nAdding idna 3.10 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for charset-normalizer==3.4.1\nBest match: charset-normalizer 3.4.1\nAdding charset-normalizer 3.4.1 to easy-install.pth file\nInstalling normalizer script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for urllib3==2.0.7\nBest match: urllib3 2.0.7\nAdding urllib3 2.0.7 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for python-dateutil==2.9.0.post0\nBest match: python-dateutil 2.9.0.post0\nAdding python-dateutil 2.9.0.post0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for pytz==2024.2\nBest match: pytz 2024.2\nAdding pytz 2024.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for typing-extensions==4.7.1\nBest match: typing-extensions 4.7.1\nAdding typing-extensions 4.7.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for commonmark==0.9.1\nBest match: commonmark 0.9.1\nAdding commonmark 0.9.1 to easy-install.pth file\nInstalling cmark script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for qasync==0.25.0\nBest match: qasync 0.25.0\nAdding qasync 0.25.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for packaging==24.0\nBest match: packaging 24.0\nAdding packaging 24.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for dictdiffer==0.9.0\nBest match: dictdiffer 0.9.0\nAdding dictdiffer 0.9.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for importlib-metadata==6.7.0\nBest match: importlib-metadata 6.7.0\nAdding importlib-metadata 6.7.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for requests-cache==1.1.1\nBest match: requests-cache 1.1.1\nAdding requests-cache 1.1.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for et-xmlfile==1.1.0\nBest match: et-xmlfile 1.1.0\nAdding et-xmlfile 1.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for kiwisolver==1.4.5\nBest match: kiwisolver 1.4.5\nAdding kiwisolver 1.4.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for cycler==0.11.0\nBest match: cycler 0.11.0\nAdding cycler 0.11.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for fonttools==4.38.0\nBest match: fonttools 4.38.0\nAdding fonttools 4.38.0 to easy-install.pth file\nInstalling fonttools script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\nInstalling pyftmerge script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\nInstalling pyftsubset script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\nInstalling ttx script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for pyparsing==3.1.4\nBest match: pyparsing 3.1.4\nAdding pyparsing 3.1.4 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for Pillow==9.5.0\nBest match: Pillow 9.5.0\nAdding Pillow 9.5.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for jaraco.classes==3.2.3\nBest match: jaraco.classes 3.2.3\nAdding jaraco.classes 3.2.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for importlib-resources==5.12.0\nBest match: importlib-resources 5.12.0\nAdding importlib-resources 5.12.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for jeepney==0.8.0\nBest match: jeepney 0.8.0\nAdding jeepney 0.8.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for SecretStorage==3.3.3\nBest match: SecretStorage 3.3.3\nAdding SecretStorage 3.3.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for httpcore==0.17.3\nBest match: httpcore 0.17.3\nAdding httpcore 0.17.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for sniffio==1.3.1\nBest match: sniffio 1.3.1\nAdding sniffio 1.3.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for six==1.17.0\nBest match: six 1.17.0\nAdding six 1.17.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for zipp==3.15.0\nBest match: zipp 3.15.0\nAdding zipp 3.15.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for platformdirs==4.0.0\nBest match: platformdirs 4.0.0\nAdding platformdirs 4.0.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for url-normalize==1.4.3\nBest match: url-normalize 1.4.3\nAdding url-normalize 1.4.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for attrs==24.2.0\nBest match: attrs 24.2.0\nAdding attrs 24.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for cattrs==23.1.2\nBest match: cattrs 23.1.2\nAdding cattrs 23.1.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for more-itertools==9.1.0\nBest match: more-itertools 9.1.0\nAdding more-itertools 9.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for cryptography==44.0.0\nBest match: cryptography 44.0.0\nAdding cryptography 44.0.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for anyio==3.7.1\nBest match: anyio 3.7.1\nAdding anyio 3.7.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for h11==0.14.0\nBest match: h11 0.14.0\nAdding h11 0.14.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for exceptiongroup==1.2.2\nBest match: exceptiongroup 1.2.2\nAdding exceptiongroup 1.2.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for cffi==1.15.1\nBest match: cffi 1.15.1\nAdding cffi 1.15.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nSearching for pycparser==2.21\nBest match: pycparser 2.21\nAdding pycparser 2.21 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages\nFinished processing dependencies for Orange3==3.26.0.dev0+f7ff577\nVerifying Orange installation...\n✅ Orange installation successful!\nSuccessfully installed orange using Python 3.7\n",
    "setup_res_stderr": "Using CPython 3.7.9\nCreating virtual environment at: .venv\nActivate with: source .venv/bin/activate\nResolved 18 packages in 140ms\nPrepared 18 packages in 3ms\nInstalled 18 packages in 753ms\n + cython==0.29.37\n + exceptiongroup==1.2.2\n + importlib-metadata==6.7.0\n + iniconfig==2.0.0\n + numpy==1.17.5\n + packaging==24.0\n + pluggy==1.2.0\n + pyqt5==5.15.10\n + pyqt5-qt5==5.15.16\n + pyqt5-sip==12.13.0\n + pyqtwebengine==5.15.6\n + pyqtwebengine-qt5==5.15.16\n + pytest==7.4.4\n + setuptools==59.8.0\n + tomli==2.0.1\n + typing-extensions==4.7.1\n + wheel==0.42.0\n + zipp==3.15.0\nResolved 53 packages in 403ms\nInstalled 46 packages in 905ms\n + anyio==3.7.1\n + baycomp==1.0.3\n + bottleneck==1.4.0\n + certifi==2024.12.14\n + cffi==1.15.1\n + chardet==5.2.0\n + charset-normalizer==3.4.1\n + cryptography==44.0.0\n + cycler==0.11.0\n + et-xmlfile==1.1.0\n + fonttools==4.38.0\n + h11==0.14.0\n + httpcore==0.17.3\n + httpx==0.24.1\n + idna==3.10\n + importlib-resources==5.12.0\n + jaraco-classes==3.2.3\n + jeepney==0.8.0\n + joblib==1.3.2\n + keyring==24.1.1\n + keyrings-alt==4.2.0\n + kiwisolver==1.4.5\n + matplotlib==3.5.3\n + more-itertools==9.1.0\n + networkx==2.6.3\n + openpyxl==3.1.3\n + opentsne==1.0.1\n + pandas==1.3.5\n + pillow==9.5.0\n + pip==24.0\n + pycparser==2.21\n + pyparsing==3.1.4\n + python-dateutil==2.9.0.post0\n + python-louvain==0.16\n + pytz==2024.2\n + pyyaml==6.0.1\n + requests==2.31.0\n + scikit-learn==0.22.2.post1\n + scipy==1.7.3\n + secretstorage==3.3.3\n + serverfiles==0.3.1\n + six==1.17.0\n + sniffio==1.3.1\n + urllib3==2.0.7\n + xlrd==2.0.1\n + xlsxwriter==3.2.0\nResolved 34 packages in 54ms\nInstalled 13 packages in 39ms\n + anyqt==0.2.0\n + attrs==24.2.0\n + cattrs==23.1.2\n + commonmark==0.9.1\n + dictdiffer==0.9.0\n + docutils==0.20.1\n + orange-canvas-core==0.1.35\n + orange-widget-base==4.22.0\n + platformdirs==4.0.0\n + pyqtgraph==0.12.4\n + qasync==0.25.0\n + requests-cache==1.1.1\n + url-normalize==1.4.3\nResolved 2 packages in 10ms\nInstalled 2 packages in 104ms\n + psycopg2==2.9.9\n + pymssql==2.3.2\nAudited 1 package in 1ms\nAudited 2 packages in 1ms\nOrange/classification/_simple_tree.c: In function ‘gain_ratio_c’:\nOrange/classification/_simple_tree.c:63:9: warning: implicit declaration of function ‘qsort_r’; did you mean ‘qsort’? [-Wimplicit-function-declaration]\n   63 |         qsort_r(base, nel, size, compar, thunk)\n      |         ^~~~~~~\nOrange/classification/_simple_tree.c:147:9: note: in expansion of macro ‘QSORT_R_FUNC’\n  147 |         QSORT_R_FUNC(examples, size, sizeof(struct Example), (void*) &compar_attr, compar_examples);\n      |         ^~~~~~~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/classification/_tree_scorers.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_2find_threshold_entropy’:\nOrange/classification/_tree_scorers.c:3115:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 3115 |   __pyx_t_7 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_6find_threshold_MSE’:\nOrange/classification/_tree_scorers.c:4619:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 4619 |   __pyx_t_1 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_8find_binarization_MSE’:\nOrange/classification/_tree_scorers.c:5396:43: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5396 |           for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_21; __pyx_t_22+=1) {\n      |                                           ^\nOrange/classification/_tree_scorers.c:5517:39: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5517 |           __pyx_t_27 = ((__pyx_v_left >= __pyx_v_min_leaf) != 0);\n      |                                       ^~\nOrange/classification/_tree_scorers.c:5523:53: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5523 |           __pyx_t_27 = (((__pyx_v_N - __pyx_v_left) >= __pyx_v_min_leaf) != 0);\n      |                                                     ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_14compute_predictions_csr’:\nOrange/classification/_tree_scorers.c:7051:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7051 |         for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_16compute_predictions_csc’:\nOrange/classification/_tree_scorers.c:7741:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7741 |         for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c:7801:143: warning: comparison of integer expressions of different signedness: ‘__pyx_t_5numpy_int32_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]\n 7801 |               __pyx_t_17 = (((*((__pyx_t_5numpy_int32_t *) ( /* dim=0 */ (__pyx_v_indices.data + __pyx_t_18 * __pyx_v_indices.strides[0]) ))) != __pyx_v_i) != 0);\n      |                                                                                                                                               ^~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/data/_valuecount.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/data/_contingency.c:598:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/data/_io.c: In function ‘__pyx_pf_6Orange_4data_3_io_sparse_read_float.constprop’:\nOrange/data/_io.c:3881:24: warning: ‘__pyx_v_decs’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3881 |           __pyx_v_decs = (__pyx_v_decs / 10.0);\n      |           ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:4070:24: warning: ‘__pyx_v_value’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4070 |           __pyx_t_10 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 221, __pyx_L5_error)\n      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:480:40: warning: ‘__pyx_v_attr_index’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n  480 |   #define PyInt_FromLong               PyLong_FromLong\n      |                                        ^~~~~~~~~~~~~~~\nOrange/data/_io.c:1301:7: note: ‘__pyx_v_attr_index’ was declared here\n 1301 |   int __pyx_v_attr_index;\n      |       ^~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:2935:25: warning: ‘__pyx_v_atomp’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 2935 |           __pyx_v_atomp = (__pyx_v_atomp + 1);\n      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/distance/_distance.c:598:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/preprocess/_discretize.c:567:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/preprocess/_relieff.cpp:627:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/projection/_som.c:598:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_5update_hex’:\nOrange/projection/_som.c:3655:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3655 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:3654:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3654 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_7get_winners_sparse’:\nOrange/projection/_som.c:4547:223: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4547 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_38, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_39, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_y;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:4114:7: note: ‘__pyx_v_win_y’ was declared here\n 4114 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:4536:223: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4536 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_36, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_37, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_x;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:4113:7: note: ‘__pyx_v_win_x’ was declared here\n 4113 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pf_6Orange_10projection_4_som_8update_sparse.constprop’:\nOrange/projection/_som.c:4746:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4746 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:4745:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4745 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_3update’:\nOrange/projection/_som.c:3141:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3141 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_1get_winners’:\nOrange/projection/_som.c:2964:223: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 2964 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_28, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_y;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:2665:7: note: ‘__pyx_v_win_y’ was declared here\n 2665 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:2953:223: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 2953 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_25, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_x;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:2664:7: note: ‘__pyx_v_win_x’ was declared here\n 2664 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pf_6Orange_10projection_4_som_10update_sparse_hex.constprop’:\nOrange/projection/_som.c:5515:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 5515 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:5514:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 5514 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n  setuptools.SetuptoolsDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/setuptools/command/easy_install.py:159: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.\n  EasyInstallDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n  setuptools.SetuptoolsDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/.venv/lib/python3.7/site-packages/setuptools/command/egg_info.py:628: SetuptoolsDeprecationWarning: Custom 'build_py' does not implement 'get_data_files_without_manifest'.\nPlease extend command classes from setuptools instead of distutils.\n  SetuptoolsDeprecationWarning\n",
    "new_commit_res_code": 1,
    "new_commit_res_stdout": "============================= test session starts ==============================\nplatform linux -- Python 3.7.9, pytest-7.4.4, pluggy-1.2.0\nrootdir: /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286\nplugins: anyio-3.7.1\ncollected 13 items\n\nr2e_tests/test_1.py E............                                        [100%]\n\n==================================== ERRORS ====================================\n_______________________ ERROR at setup of test_filename ________________________\nfile /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/Orange/tests/__init__.py, line 65\n  def test_filename(path):\nE       fixture 'path' not found\n>       available fixtures: anyio_backend, anyio_backend_name, anyio_backend_options, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory\n>       use 'pytest --fixtures [testpath]' for help on them.\n\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/Orange/tests/__init__.py:65\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestNormalizer::test_datetime_normalization\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_default\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_sparse\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_sd\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_span\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_span_class\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_span_zero\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_span_zero_class\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_class\nPASSED r2e_tests/test_1.py::TestNormalizer::test_number_of_decimals\nPASSED r2e_tests/test_1.py::TestNormalizer::test_retain_vars_attributes\nPASSED r2e_tests/test_1.py::TestNormalizer::test_skip_normalization\nERROR r2e_tests/test_1.py::test_filename\n========================= 12 passed, 1 error in 1.89s ==========================\n",
    "new_commit_res_stderr": "",
    "old_commit_res_code": 1,
    "old_commit_res_stdout": "============================= test session starts ==============================\nplatform linux -- Python 3.7.9, pytest-7.4.4, pluggy-1.2.0\nrootdir: /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286\nplugins: anyio-3.7.1\ncollected 13 items\n\nr2e_tests/test_1.py E....FFFF.F..                                        [100%]\n\n==================================== ERRORS ====================================\n_______________________ ERROR at setup of test_filename ________________________\nfile /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/Orange/tests/__init__.py, line 65\n  def test_filename(path):\nE       fixture 'path' not found\n>       available fixtures: anyio_backend, anyio_backend_name, anyio_backend_options, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory\n>       use 'pytest --fixtures [testpath]' for help on them.\n\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_f7ff577a4b2b94719c53eb37d63191c0f683a286/Orange/tests/__init__.py:65\n=================================== FAILURES ===================================\n_______________ TestNormalizer.test_normalize_transform_by_span ________________\n\nself = <r2e_tests.test_1.TestNormalizer testMethod=test_normalize_transform_by_span>\n\n    def test_normalize_transform_by_span(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n>       data_norm = normalizer(self.data)\n\nr2e_tests/test_1.py:62: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/preprocess/preprocess.py:356: in __call__\n    return normalizer(data)\nOrange/preprocess/normalize.py:27: in __call__\n    (i, var) in enumerate(data.domain.attributes)]\nOrange/preprocess/normalize.py:27: in <listcomp>\n    (i, var) in enumerate(data.domain.attributes)]\nOrange/preprocess/normalize.py:44: in normalize\n    var = self.normalize_by_span(dist, var)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = Normalizer(zero_based=False, norm_type=Normalize.NormalizeBySpan)\ndist = Continuous([], shape=(2, 0), dtype=float64)\nvar = ContinuousVariable(name='c4', number_of_decimals=0)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n>       num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\nE       ValueError: cannot convert float NaN to integer\n\nOrange/preprocess/normalize.py:68: ValueError\n____________ TestNormalizer.test_normalize_transform_by_span_class _____________\n\nself = <r2e_tests.test_1.TestNormalizer testMethod=test_normalize_transform_by_span_class>\n\n    def test_normalize_transform_by_span_class(self):\n        normalizer = Normalize(zero_based=False,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n>       data_norm = normalizer(self.data)\n\nr2e_tests/test_1.py:82: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/preprocess/preprocess.py:356: in __call__\n    return normalizer(data)\nOrange/preprocess/normalize.py:27: in __call__\n    (i, var) in enumerate(data.domain.attributes)]\nOrange/preprocess/normalize.py:27: in <listcomp>\n    (i, var) in enumerate(data.domain.attributes)]\nOrange/preprocess/normalize.py:44: in normalize\n    var = self.normalize_by_span(dist, var)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = Normalizer(zero_based=False, norm_type=Normalize.NormalizeBySpan, transform_class=True)\ndist = Continuous([], shape=(2, 0), dtype=float64)\nvar = ContinuousVariable(name='c4', number_of_decimals=0)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n>       num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\nE       ValueError: cannot convert float NaN to integer\n\nOrange/preprocess/normalize.py:68: ValueError\n_____________ TestNormalizer.test_normalize_transform_by_span_zero _____________\n\nself = <r2e_tests.test_1.TestNormalizer testMethod=test_normalize_transform_by_span_zero>\n\n    def test_normalize_transform_by_span_zero(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=False)\n>       data_norm = normalizer(self.data)\n\nr2e_tests/test_1.py:72: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/preprocess/preprocess.py:356: in __call__\n    return normalizer(data)\nOrange/preprocess/normalize.py:27: in __call__\n    (i, var) in enumerate(data.domain.attributes)]\nOrange/preprocess/normalize.py:27: in <listcomp>\n    (i, var) in enumerate(data.domain.attributes)]\nOrange/preprocess/normalize.py:44: in normalize\n    var = self.normalize_by_span(dist, var)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = Normalizer(norm_type=Normalize.NormalizeBySpan)\ndist = Continuous([], shape=(2, 0), dtype=float64)\nvar = ContinuousVariable(name='c4', number_of_decimals=0)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n>       num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\nE       ValueError: cannot convert float NaN to integer\n\nOrange/preprocess/normalize.py:68: ValueError\n__________ TestNormalizer.test_normalize_transform_by_span_zero_class __________\n\nself = <r2e_tests.test_1.TestNormalizer testMethod=test_normalize_transform_by_span_zero_class>\n\n    def test_normalize_transform_by_span_zero_class(self):\n        normalizer = Normalize(zero_based=True,\n                               norm_type=Normalize.NormalizeBySpan,\n                               transform_class=True)\n>       data_norm = normalizer(self.data)\n\nr2e_tests/test_1.py:92: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \nOrange/preprocess/preprocess.py:356: in __call__\n    return normalizer(data)\nOrange/preprocess/normalize.py:27: in __call__\n    (i, var) in enumerate(data.domain.attributes)]\nOrange/preprocess/normalize.py:27: in <listcomp>\n    (i, var) in enumerate(data.domain.attributes)]\nOrange/preprocess/normalize.py:44: in normalize\n    var = self.normalize_by_span(dist, var)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nself = Normalizer(norm_type=Normalize.NormalizeBySpan, transform_class=True)\ndist = Continuous([], shape=(2, 0), dtype=float64)\nvar = ContinuousVariable(name='c4', number_of_decimals=0)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n>       num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\nE       ValueError: cannot convert float NaN to integer\n\nOrange/preprocess/normalize.py:68: ValueError\n____________________ TestNormalizer.test_number_of_decimals ____________________\n\nself = <r2e_tests.test_1.TestNormalizer testMethod=test_number_of_decimals>\n\n    def test_number_of_decimals(self):\n        foo = ContinuousVariable(\"Foo\", number_of_decimals=0)\n        data = Table.from_list(Domain((foo,)), [[1], [2], [3]])\n    \n        normalized = Normalize()(data)\n        norm_foo: ContinuousVariable = normalized.domain.attributes[0]\n    \n>       self.assertGreater(norm_foo.number_of_decimals, 0)\nE       AssertionError: 0 not greater than 0\n\nr2e_tests/test_1.py:164: AssertionError\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestNormalizer::test_datetime_normalization\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_default\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_sparse\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_sd\nPASSED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_class\nPASSED r2e_tests/test_1.py::TestNormalizer::test_retain_vars_attributes\nPASSED r2e_tests/test_1.py::TestNormalizer::test_skip_normalization\nERROR r2e_tests/test_1.py::test_filename\nFAILED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_span\nFAILED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_span_class\nFAILED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_span_zero\nFAILED r2e_tests/test_1.py::TestNormalizer::test_normalize_transform_by_span_zero_class\nFAILED r2e_tests/test_1.py::TestNormalizer::test_number_of_decimals - Asserti...\n===================== 5 failed, 7 passed, 1 error in 1.88s =====================\n",
    "old_commit_res_stderr": ""
}
Orange/preprocess/normalize.py Orange/tests/test_normalize.py
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** ValueError When Calculating `number_of_decimals` with NaN Difference

**Description:**
When normalizing data, if the calculated difference (`diff`) becomes NaN, the process of determining `number_of_decimals` fails. This happens because the code attempts to convert a NaN value to an integer, resulting in a `ValueError`.

**Example Buggy Code:**
```python
from Orange.preprocess.normalize import Normalize
from Orange.data import Table, Domain, ContinuousVariable

# Define a continuous variable with zero decimals
foo = ContinuousVariable('Foo', number_of_decimals=0)
data = Table.from_list(Domain((foo,)), [[1], [2], [3]])

# Attempt to normalize the data
normalizer = Normalize()
normalized = normalizer(data)
```

**Expected Behavior:**
The normalization process should handle cases where the difference (`diff`) is NaN gracefully, possibly by setting a default number of decimals instead of attempting to convert NaN to an integer.

**Actual Behavior:**
A `ValueError` is raised with the message: 
```
ValueError: cannot convert float NaN to integer
```
This occurs during the calculation of `number_of_decimals` when `diff` is NaN.

[/ISSUE]
--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.

--- BEGIN FILE ---
```
### Orange/preprocess/normalize.py
import numpy as np

from Orange.data import Domain, ContinuousVariable
from Orange.statistics import distribution
from Orange.util import Reprable
from .preprocess import Normalize
from .transformation import Normalizer as Norm
__all__ = ["Normalizer"]


class Normalizer(Reprable):
    def __init__(self,
                 zero_based=True,
                 norm_type=Normalize.NormalizeBySD,
                 transform_class=False,
                 center=True,
                 normalize_datetime=False):
        self.zero_based = zero_based
        self.norm_type = norm_type
        self.transform_class = transform_class
        self.center = center
        self.normalize_datetime = normalize_datetime

    def __call__(self, data):
        dists = distribution.get_distributions(data)
        new_attrs = [self.normalize(dists[i], var) for
                     (i, var) in enumerate(data.domain.attributes)]

        new_class_vars = data.domain.class_vars
        if self.transform_class:
            attr_len = len(data.domain.attributes)
            new_class_vars = [self.normalize(dists[i + attr_len], var) for
                              (i, var) in enumerate(data.domain.class_vars)]

        domain = Domain(new_attrs, new_class_vars, data.domain.metas)
        return data.transform(domain)

    def normalize(self, dist, var):
        if not var.is_continuous or (var.is_time and not self.normalize_datetime):
            return var
        elif self.norm_type == Normalize.NormalizeBySD:
            var = self.normalize_by_sd(dist, var)
        elif self.norm_type == Normalize.NormalizeBySpan:
            var = self.normalize_by_span(dist, var)
        return var

    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:
        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)
        if sd == 0:
            sd = 1
        if self.center:
            compute_val = Norm(var, avg, 1 / sd)
        else:
            compute_val = Norm(var, 0, 1 / sd)
        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))
        num_decimals = max(num_decimals, 0)  # num decimals can't be negative
        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)

    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:
        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)
        diff = dma - dmi
        if diff < 1e-15:
            diff = 1
        if self.zero_based:
            compute_val = Norm(var, dmi, 1 / diff)
        else:
            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)
        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))
        num_decimals = max(num_decimals, 0)  # num decimals can't be negative
        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)

```
--- END FILE ---

Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.

Every *SEARCH/REPLACE* edit must use this format:
1. The file path
2. The start of search block: <<<<<<< SEARCH
3. A contiguous chunk of lines to search for in the existing source code
4. The dividing line: =======
5. The lines to replace into the source code
6. The end of the replace block: >>>>>>> REPLACE

Here is an example:

```python
### mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
</solution>

Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
Wrap each *SEARCH/REPLACE* edit in a code block as shown in the example above. If you have multiple *SEARCH/REPLACE* edits, use a separate code block for each one.
[ISSUE]
**Title:** ValueError When Calculating `number_of_decimals` with NaN Difference

**Description:**
When normalizing data, if the calculated difference (`diff`) becomes NaN, the process of determining `number_of_decimals` fails. This happens because the code attempts to convert a NaN value to an integer, resulting in a `ValueError`.

**Example Buggy Code:**
```python
from Orange.preprocess.normalize import Normalize
from Orange.data import Table, Domain, ContinuousVariable

# Define a continuous variable with zero decimals
foo = ContinuousVariable('Foo', number_of_decimals=0)
data = Table.from_list(Domain((foo,)), [[1], [2], [3]])

# Attempt to normalize the data
normalizer = Normalize()
normalized = normalizer(data)
```

**Expected Behavior:**
The normalization process should handle cases where the difference (`diff`) is NaN gracefully, possibly by setting a default number of decimals instead of attempting to convert NaN to an integer.

**Actual Behavior:**
A `ValueError` is raised with the message: 
```
ValueError: cannot convert float NaN to integer
```
This occurs during the calculation of `number_of_decimals` when `diff` is NaN.

[/ISSUE]
{
    "TestNormalizer.test_datetime_normalization": "PASSED",
    "TestNormalizer.test_normalize_default": "PASSED",
    "TestNormalizer.test_normalize_sparse": "PASSED",
    "TestNormalizer.test_normalize_transform_by_sd": "PASSED",
    "TestNormalizer.test_normalize_transform_by_span": "PASSED",
    "TestNormalizer.test_normalize_transform_by_span_class": "PASSED",
    "TestNormalizer.test_normalize_transform_by_span_zero": "PASSED",
    "TestNormalizer.test_normalize_transform_by_span_zero_class": "PASSED",
    "TestNormalizer.test_normalize_transform_class": "PASSED",
    "TestNormalizer.test_number_of_decimals": "PASSED",
    "TestNormalizer.test_retain_vars_attributes": "PASSED",
    "TestNormalizer.test_skip_normalization": "PASSED",
    "test_filename": "ERROR"
}
diff --git a/Orange/preprocess/normalize.py b/Orange/preprocess/normalize.py
index 23ec66560..83868ee5d 100644
--- a/Orange/preprocess/normalize.py
+++ b/Orange/preprocess/normalize.py
@@ -52,8 +52,14 @@ class Normalizer(Reprable):
             compute_val = Norm(var, avg, 1 / sd)
         else:
             compute_val = Norm(var, 0, 1 / sd)
-        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))
-        num_decimals = max(num_decimals, 0)  # num decimals can't be negative
+
+        # When dealing with integers, and multiplying by something smaller than
+        # 1, the number of decimals should be decreased, but this integer will
+        # likely turn into a float, which should have some default number of
+        # decimals
+        num_decimals = var.number_of_decimals + int(np.round(np.log10(sd)))
+        num_decimals = max(num_decimals, 1)  # num decimals can't be negative
+
         return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)
 
     def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:
@@ -65,6 +71,9 @@ class Normalizer(Reprable):
             compute_val = Norm(var, dmi, 1 / diff)
         else:
             compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)
-        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))
-        num_decimals = max(num_decimals, 0)  # num decimals can't be negative
-        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)
+        if not np.isnan(diff):
+            num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))
+            num_decimals = max(num_decimals, 0)  # num decimals can't be negative
+            return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)
+        else:
+            return var.copy(compute_value=compute_val)

{"Orange/preprocess/normalize.py": "import numpy as np\n\nfrom Orange.data import Domain, ContinuousVariable\nfrom Orange.statistics import distribution\nfrom Orange.util import Reprable\nfrom .preprocess import Normalize\nfrom .transformation import Normalizer as Norm\n__all__ = [\"Normalizer\"]\n\n\nclass Normalizer(Reprable):\n    def __init__(self,\n                 zero_based=True,\n                 norm_type=Normalize.NormalizeBySD,\n                 transform_class=False,\n                 center=True,\n                 normalize_datetime=False):\n        self.zero_based = zero_based\n        self.norm_type = norm_type\n        self.transform_class = transform_class\n        self.center = center\n        self.normalize_datetime = normalize_datetime\n\n    def __call__(self, data):\n        dists = distribution.get_distributions(data)\n        new_attrs = [self.normalize(dists[i], var) for\n                     (i, var) in enumerate(data.domain.attributes)]\n\n        new_class_vars = data.domain.class_vars\n        if self.transform_class:\n            attr_len = len(data.domain.attributes)\n            new_class_vars = [self.normalize(dists[i + attr_len], var) for\n                              (i, var) in enumerate(data.domain.class_vars)]\n\n        domain = Domain(new_attrs, new_class_vars, data.domain.metas)\n        return data.transform(domain)\n\n    def normalize(self, dist, var):\n        if not var.is_continuous or (var.is_time and not self.normalize_datetime):\n            return var\n        elif self.norm_type == Normalize.NormalizeBySD:\n            var = self.normalize_by_sd(dist, var)\n        elif self.norm_type == Normalize.NormalizeBySpan:\n            var = self.normalize_by_span(dist, var)\n        return var\n\n    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)\n        if sd == 0:\n            sd = 1\n        if self.center:\n            compute_val = Norm(var, avg, 1 / sd)\n        else:\n            compute_val = Norm(var, 0, 1 / sd)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n\n    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:\n        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)\n        diff = dma - dmi\n        if diff < 1e-15:\n            diff = 1\n        if self.zero_based:\n            compute_val = Norm(var, dmi, 1 / diff)\n        else:\n            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)\n        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))\n        num_decimals = max(num_decimals, 0)  # num decimals can't be negative\n        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)\n"}
A user will ask you to solve a task. You should first draft your thinking process (inner monologue). Then, generate the solution.

Your response format must follow the template below:
<think>
Your thoughts or/and draft, like working through an exercise on scratch paper. Be as casual and as long as you want until you are confident to generate a correct solution.
</think>
<solution>
Final solution presented to the user.
</solution>
system
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** ValueError When Calculating `number_of_decimals` with NaN Difference

**Description:**
When normalizing data, if the calculated difference (`diff`) becomes NaN, the process of determining `number_of_decimals` fails. This happens because the code attempts to convert a NaN value to an integer, resulting in a `ValueError`.

**Example Buggy Code:**
```python
from Orange.preprocess.normalize import Normalize
from Orange.data import Table, Domain, ContinuousVariable

# Define a continuous variable with zero decimals
foo = ContinuousVariable('Foo', number_of_decimals=0)
data = Table.from_list(Domain((foo,)), [[1], [2], [3]])

# Attempt to normalize the data
normalizer = Normalize()
normalized = normalizer(data)
```

**Expected Behavior:**
The normalization process should handle cases where the difference (`diff`) is NaN gracefully, possibly by setting a default number of decimals instead of attempting to convert NaN to an integer.

**Actual Behavior:**
A `ValueError` is raised with the message: 
```
ValueError: cannot convert float NaN to integer
```
This occurs during the calculation of `number_of_decimals` when `diff` is NaN.

[/ISSUE]
--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.

--- BEGIN FILE ---
```
### Orange/preprocess/normalize.py
import numpy as np

from Orange.data import Domain, ContinuousVariable
from Orange.statistics import distribution
from Orange.util import Reprable
from .preprocess import Normalize
from .transformation import Normalizer as Norm
__all__ = ["Normalizer"]


class Normalizer(Reprable):
    def __init__(self,
                 zero_based=True,
                 norm_type=Normalize.NormalizeBySD,
                 transform_class=False,
                 center=True,
                 normalize_datetime=False):
        self.zero_based = zero_based
        self.norm_type = norm_type
        self.transform_class = transform_class
        self.center = center
        self.normalize_datetime = normalize_datetime

    def __call__(self, data):
        dists = distribution.get_distributions(data)
        new_attrs = [self.normalize(dists[i], var) for
                     (i, var) in enumerate(data.domain.attributes)]

        new_class_vars = data.domain.class_vars
        if self.transform_class:
            attr_len = len(data.domain.attributes)
            new_class_vars = [self.normalize(dists[i + attr_len], var) for
                              (i, var) in enumerate(data.domain.class_vars)]

        domain = Domain(new_attrs, new_class_vars, data.domain.metas)
        return data.transform(domain)

    def normalize(self, dist, var):
        if not var.is_continuous or (var.is_time and not self.normalize_datetime):
            return var
        elif self.norm_type == Normalize.NormalizeBySD:
            var = self.normalize_by_sd(dist, var)
        elif self.norm_type == Normalize.NormalizeBySpan:
            var = self.normalize_by_span(dist, var)
        return var

    def normalize_by_sd(self, dist, var: ContinuousVariable) -> ContinuousVariable:
        avg, sd = (dist.mean(), dist.standard_deviation()) if dist.size else (0, 1)
        if sd == 0:
            sd = 1
        if self.center:
            compute_val = Norm(var, avg, 1 / sd)
        else:
            compute_val = Norm(var, 0, 1 / sd)
        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(sd)))
        num_decimals = max(num_decimals, 0)  # num decimals can't be negative
        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)

    def normalize_by_span(self, dist, var: ContinuousVariable) -> ContinuousVariable:
        dma, dmi = (dist.max(), dist.min()) if dist.shape[1] else (np.nan, np.nan)
        diff = dma - dmi
        if diff < 1e-15:
            diff = 1
        if self.zero_based:
            compute_val = Norm(var, dmi, 1 / diff)
        else:
            compute_val = Norm(var, (dma + dmi) / 2, 2 / diff)
        num_decimals = var.number_of_decimals + int(np.ceil(np.log10(diff)))
        num_decimals = max(num_decimals, 0)  # num decimals can't be negative
        return var.copy(compute_value=compute_val, number_of_decimals=num_decimals)

```
--- END FILE ---

Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.

Every *SEARCH/REPLACE* edit must use this format:
1. The file path
2. The start of search block: <<<<<<< SEARCH
3. A contiguous chunk of lines to search for in the existing source code
4. The dividing line: =======
5. The lines to replace into the source code
6. The end of the replace block: >>>>>>> REPLACE

Here is an example:

```python
### mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
</solution>

Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
Wrap each *SEARCH/REPLACE* edit in a code block as shown in the example above. If you have multiple *SEARCH/REPLACE* edits, use a separate code block for each one.
user