Skip to content

Commit

Permalink
make some type more strics in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
juanbc committed Nov 28, 2023
1 parent b3a9b35 commit e3cc9b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions skcriteria/core/dominance.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def compare(self, a0, a1):
]
)

df = df.assign(
Performance=[performance_a0, performance_a1, eq],
df["Performance"] = pd.Series(
[performance_a0, performance_a1, eq], index=df.index
)

return df
Expand Down
6 changes: 3 additions & 3 deletions skcriteria/extend.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def mkagg(maybe_func=None, **hparams):
The decorated function should receive the parameters 'matrix',
'objectives', 'weights', 'dtypes', 'alternatives', 'criteria',
'hparams', or **kwargs.
'hparams', or kwargs.
Additionally, it should return an array with rankings for each
alternative and an optional dictionary with calculations that you wish
Expand Down Expand Up @@ -220,10 +220,10 @@ def mktransformer(maybe_func=None, **hparams):
The decorated function should receive the parameters 'matrix',
'objectives', 'weights', 'dtypes', 'alternatives', 'criteria',
'hparams', or **kwargs.
'hparams', or kwargs.
In addition, it must return a dictionary whose keys are some
as the received parameters (including the keys in '**kwargs').
as the received parameters (including the keys in 'kwargs').
These values replace those of the original array.
If you return 'hparams,' the transformer will ignore it.
Expand Down
2 changes: 1 addition & 1 deletion skcriteria/utils/rank.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def rank_values(arr, reverse=False):
"""
if reverse:
arr = np.multiply(arr, -1)
return stats.rankdata(arr, "dense").astype(int)
return stats.rankdata(arr, "dense").astype(np.int64)


# =============================================================================
Expand Down

0 comments on commit e3cc9b9

Please sign in to comment.