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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hdim_opt
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Optimization toolkit for high-dimensional, non-differentiable problems.
5
5
  Author-email: Julian Soltes <jsoltes@regis.edu>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  # hdim_opt/__init__.py
2
2
 
3
3
  # package version
4
- __version__ = "1.2.1"
4
+ __version__ = "1.2.2"
5
5
  __all__ = ['quasar', 'hds', 'sobol', 'sensitivity', 'test_functions', 'quasar_helpers'] # available for star imports
6
6
 
7
7
  # import core components
@@ -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
- initial_population = init
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 = init.shape
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hdim_opt
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Optimization toolkit for high-dimensional, non-differentiable problems.
5
5
  Author-email: Julian Soltes <jsoltes@regis.edu>
6
6
  License: MIT
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "hdim_opt"
9
- version = "1.2.1" # match __version__ in __init__.py
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