hdim-opt 1.2.1__py3-none-any.whl → 1.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hdim_opt/__init__.py +1 -1
- hdim_opt/quasar_optimization.py +5 -2
- {hdim_opt-1.2.1.dist-info → hdim_opt-1.2.2.dist-info}/METADATA +1 -1
- {hdim_opt-1.2.1.dist-info → hdim_opt-1.2.2.dist-info}/RECORD +6 -6
- {hdim_opt-1.2.1.dist-info → hdim_opt-1.2.2.dist-info}/WHEEL +0 -0
- {hdim_opt-1.2.1.dist-info → hdim_opt-1.2.2.dist-info}/top_level.txt +0 -0
hdim_opt/__init__.py
CHANGED
hdim_opt/quasar_optimization.py
CHANGED
|
@@ -58,9 +58,12 @@ def initialize_population(popsize, bounds, init, hds_weights, seed, verbose):
|
|
|
58
58
|
print(f'Initializing: Random population (N={popsize}, D={n_dimensions}).')
|
|
59
59
|
initial_population = np.random.uniform(low=bounds[:, 0], high=bounds[:, 1], size=(popsize, n_dimensions))
|
|
60
60
|
else:
|
|
61
|
-
|
|
61
|
+
if init.ndim == 1:
|
|
62
|
+
initial_population = init.reshape(-1,1)
|
|
63
|
+
else:
|
|
64
|
+
initial_population = init
|
|
62
65
|
if verbose:
|
|
63
|
-
custom_popsize, custom_n_dimensions =
|
|
66
|
+
custom_popsize, custom_n_dimensions = initial_population.shape
|
|
64
67
|
print(f'Initializing: Custom population (N={custom_popsize}, D={custom_n_dimensions}).')
|
|
65
68
|
|
|
66
69
|
return initial_population
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
hdim_opt/__init__.py,sha256=
|
|
1
|
+
hdim_opt/__init__.py,sha256=eGhYIxj6AUhhlfqgAHtPQdul64gYYLaWl8esUs-vkgI,477
|
|
2
2
|
hdim_opt/hyperellipsoid_sampling.py,sha256=c34JkVciZbdAXjdfNjfC4h5NsrT2CD7Epsxpef5a1xY,24625
|
|
3
3
|
hdim_opt/quasar_helpers.py,sha256=zTgar2EuWs4MLSLEO7HRcP7At1xbXLP3q4Gg7-GrggQ,14799
|
|
4
|
-
hdim_opt/quasar_optimization.py,sha256=
|
|
4
|
+
hdim_opt/quasar_optimization.py,sha256=cSF_aOijVhdtvr7VEBUNVyBQ1--1s8cOuWZMuPogf5A,32093
|
|
5
5
|
hdim_opt/sobol_sampling.py,sha256=Xe_Zzs13xMxCben17gT85lFsoV-GKVOAAgi7lMxnlBI,912
|
|
6
6
|
hdim_opt/sobol_sensitivity.py,sha256=1ebeDSTmcLn03_MKDGiyJJ7r_ZSNCq2AKNcTX-hI23A,4384
|
|
7
7
|
hdim_opt/test_functions.py,sha256=RqjKYIiwAqWplGUsH4oPHLBrVdnLRyw7f0dJX5iyJ4g,2821
|
|
8
|
-
hdim_opt-1.2.
|
|
9
|
-
hdim_opt-1.2.
|
|
10
|
-
hdim_opt-1.2.
|
|
11
|
-
hdim_opt-1.2.
|
|
8
|
+
hdim_opt-1.2.2.dist-info/METADATA,sha256=jId-zu3VAQTuQFgwlSQqKTgnCtwbORXuLbqsCVbSvA4,3130
|
|
9
|
+
hdim_opt-1.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
10
|
+
hdim_opt-1.2.2.dist-info/top_level.txt,sha256=1KtWo9tEfEK3GC8D43cwVsC8yVG2Kc-9pl0hhcDjw4o,9
|
|
11
|
+
hdim_opt-1.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|