Skip to content

Commit

Permalink
fix a lot
Browse files Browse the repository at this point in the history
  • Loading branch information
leliel12 committed Feb 21, 2016
1 parent af96bc2 commit a43b6ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions skcriteria/electre.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import numpy as np

from skcriteria.common import norm, util, rank
from skcriteria.common import norm, util


# =============================================================================
Expand Down Expand Up @@ -64,7 +64,6 @@ def concordance(nmtx, ncriteria, nweights):
def discordance(nmtx, ncriteria, nweights):

mtx_criteria = np.tile(ncriteria, (len(nmtx), 1))
mtx_weight = np.tile(nweights, (len(nmtx), 1))
mtx_discordance = np.empty((len(nmtx), len(nmtx)))
ranges = np.max(nmtx, axis=0) - np.min(nmtx, axis=0)

Expand Down Expand Up @@ -109,7 +108,6 @@ def electre1(mtx, criteria, weights=1):

better_than = np.sum(outrank, axis=1)

kernel = np.where(better_than==len(nmtx)-1)[0]
kernel = np.where(better_than == len(nmtx) - 1)[0]

return kernel, outrank, mtx_concordance, mtx_discordance, p, q

2 changes: 0 additions & 2 deletions skcriteria/tests/test_electre.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
# IMPORTS
# =============================================================================

import random

import numpy as np

from . import core
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ skip_install = True
usedevelop = False
deps = flake8
commands =
flake8 setup.py skcriteria
flake8 setup.py skcriteria --ignore=E121,E123,E126,E226,E24,E704,E402

[testenv:coverage]
basepython = python
Expand Down

0 comments on commit a43b6ae

Please sign in to comment.