Skip to content

Commit b5cccec

Browse files
committed
3.0.165
1 parent 8348263 commit b5cccec

File tree

4 files changed

+30
-25
lines changed

4 files changed

+30
-25
lines changed

.github/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ To stop playing press Ctrl+C in either the terminal or mpv
9999
<details><summary>List all subcommands</summary>
100100

101101
$ library
102-
library (v3.0.164; 103 subcommands)
102+
library (v3.0.165; 103 subcommands)
103103

104104
Create database subcommands:
105105
╭─────────────────┬──────────────────────────────────────────╮

library/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from library.utils import argparse_utils, iterables
66
from library.utils.log_utils import log
77

8-
__version__ = "3.0.164"
8+
__version__ = "3.0.165"
99

1010
progs = {
1111
"Create database subcommands": {

library/tablefiles/mcda.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ def auto_mcda(args, alternatives, minimize_cols, df=None):
101101

102102
goal_directions = np.array([-1 if col in minimize_cols else 1 for col in alternatives.columns])
103103
alternatives_np = alternatives.fillna(getattr(args, "nodata", None) or 0).to_numpy()
104+
105+
# Ensure strictly positive for pymcdm 1.4.0+ entropy_weights/sum_normalization
106+
if np.any(alternatives_np <= 0):
107+
alternatives_np = np.where(alternatives_np <= 0, 1e-9, alternatives_np)
108+
104109
weights = w.entropy_weights(alternatives_np)
105110

106111
methods = [TOPSIS(), MABAC()]

pdm.lock

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)