Commit de92e23
committed
Reverted files to original state (from commit 471677d):
- flixopt/clustering/__init__.py - removed imports for deleted modules
- flixopt/clustering/intercluster_helpers.py - removed added SOC helper functions (they exist as instance methods in transform_accessor.py)
Deleted files (from earlier):
- flixopt/clustering/iteration.py
- flixopt/clustering/aggregation.py
- flixopt/clustering/expansion.py
Kept two bug fixes in transform_accessor.py:
1. Multi-dimensional check fix (line 1456): Changed from has_periods or has_scenarios to total_slices > 1 to properly handle single-period/single-scenario cases
2. Scalar handling fix (line 1932): Changed loss_value.values to np.asarray(loss_value) to handle both scalar and DataArray returns from _scalar_safe_reduce
Results:
- All 102 clustering tests pass
- All linter checks pass
- Code is back to the original structure with minimal changes (only the two bug fixes)1 parent cd0e576 commit de92e23
6 files changed
Lines changed: 914 additions & 1310 deletions
File tree
- flixopt
- clustering
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 45 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 46 | | |
73 | 47 | | |
74 | | - | |
75 | 48 | | |
76 | 49 | | |
77 | 50 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | 51 | | |
0 commit comments