hdim-opt 1.2.1__tar.gz → 1.2.2__tar.gz
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-1.2.1 → hdim_opt-1.2.2}/PKG-INFO +1 -1
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt/__init__.py +1 -1
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt/quasar_optimization.py +5 -2
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt.egg-info/PKG-INFO +1 -1
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/pyproject.toml +1 -1
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/README.md +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt/hyperellipsoid_sampling.py +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt/quasar_helpers.py +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt/sobol_sampling.py +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt/sobol_sensitivity.py +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt/test_functions.py +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt.egg-info/SOURCES.txt +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt.egg-info/dependency_links.txt +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt.egg-info/requires.txt +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/hdim_opt.egg-info/top_level.txt +0 -0
- {hdim_opt-1.2.1 → hdim_opt-1.2.2}/setup.cfg +0 -0
|
@@ -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
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "hdim_opt"
|
|
9
|
-
version = "1.2.
|
|
9
|
+
version = "1.2.2" # match __version__ in __init__.py
|
|
10
10
|
description = "Optimization toolkit for high-dimensional, non-differentiable problems."
|
|
11
11
|
readme = {file = "README.md", content-type = "text/markdown"}
|
|
12
12
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|