GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Issues (4082)

Orange/preprocess/impute.py (3 issues)

1
import copy
0 ignored issues
show
The import copy seems to be unused.
Loading history...
2
3
import numpy
0 ignored issues
show
The import numpy could not be resolved.

This can be caused by one of the following:

1. Missing Dependencies

This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

2. Missing __init__.py files

This error could also result from missing __init__.py files in your module folders. Make sure that you place one file in each sub-folder.

Loading history...
4
5
import Orange.data
0 ignored issues
show
The import Orange.data seems to be unused.
Loading history...
6
from Orange.statistics import distribution, basic_stats
7
from .transformation import Transformation
8
9
__all__ = ["ReplaceUnknowns", "Average"]
10
11
12
class ReplaceUnknowns(Transformation):
13
    def __init__(self, variable, value=0):
14
        super().__init__(variable)
15
        self.value = value
16
17
    def transform(self, c):
18
        return numpy.where(numpy.isnan(c), self.value, c)
19
20
21
class Average:
22
    def __call__(self, data, variable, value=None):
23
        variable = data.domain[variable]
24
        if value is None:
25
            if variable.is_continuous:
26
                stats = basic_stats.BasicStats(data, variable)
27
                value = stats.mean
28
            elif variable.is_discrete:
29
                dist = distribution.get_distribution(data, variable)
30
                value = dist.modus()
31
            else:
32
                raise TypeError("Variable must be continuous or discrete")
33
34
        return variable.copy(compute_value=ReplaceUnknowns(variable, value))
35