Question: I am using a 64bit Windows 10 machine.

I am trying to install the [fancy impute module](https://github.com/hammerlab/fancyimpute) to do K-Nearest Neighbors Imputation of null values in a data set.

I have had to separately install `cvxopt` with 

```
conda install -c https://conda.binstar.org/eswears cvxopt

```

and Keras using

```
pip install keras

```

When I write into python from the command prompt

```
[Anaconda2] C:\Users\path>python
>>> import fancyimpute

```

I receive the below errors (I have truncated the error messages but can show full errors on request) 

```
Using Theano backend.
WARNING (theano.configdefaults): g++ not detected...
'g++' is not recognized as an internal or external command...

```

**EDIT**
To remedy the problem, I have downloaded MinGW and followed the directions [here](https://stackoverflow.com/questions/9741568/g-is-not-recognized-as-an-internal-or-external-command-mingw), but am still receiving the same error.

My questions are: 

(1) is there another way around the error messages I am receiving? 

(2) is there a python module that also does K-Nearest Neighbors Imputation of null values?

Answer: 
Just looking at your code (and not giving you another, out of many neat ways, to calculate this): your function expects return type `Int`, but you return `Double`. 

Below follows your code with commented corrections:

```
func averageOf(numbers: Int...) -> Double {
    var sum = 0                  // ^ note the return type here
    var countOfNumbers = 0
    for number in numbers {
        sum += number
        countOfNumbers += 1
    }
    /* Note here: you declare 'result' to be of type Double */
    var result: Double = Double(sum) / Double(countOfNumbers)
    return result /* and return 'result'; hence returning a Double */
}

averageOf(10, 20, 30) // 20.0 <-- a Double

```
Your function is declared as returning an Int:

```
func averageOf(numbers: Int...) -> ***Int*** {
```

You can't return a Double because it doesn't match this signature. You could either convert back to an Int before returning, or change the function signature.