polysolve 0.4.0__tar.gz → 0.4.1__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: polysolve
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: A Python library for representing, manipulating, and solving exponential functions using analytical methods and genetic algorithms, with optional CUDA acceleration.
5
5
  Author-email: Jonathan Rampersad <jonathan@jono-rams.work>
6
6
  License: MIT License
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  # --- Core Metadata ---
7
7
  name = "polysolve"
8
- version = "0.4.0"
8
+ version = "0.4.1"
9
9
  authors = [
10
10
  { name="Jonathan Rampersad", email="jonathan@jono-rams.work" },
11
11
  ]
@@ -295,7 +295,8 @@ class Function:
295
295
  y_calculated = np.polyval(self.coefficients, solutions)
296
296
  error = y_calculated - y_val
297
297
 
298
- ranks = np.where(error == 0, np.finfo(float).max, np.abs(1.0 / error))
298
+ with np.errstate(divide='ignore'):
299
+ ranks = np.where(error == 0, np.finfo(float).max, np.abs(1.0 / error))
299
300
 
300
301
  # Sort solutions by fitness (descending)
301
302
  sorted_indices = np.argsort(-ranks)
@@ -345,7 +346,8 @@ class Function:
345
346
  # After all generations, do one last ranking to find the best solutions
346
347
  y_calculated = np.polyval(self.coefficients, solutions)
347
348
  error = y_calculated - y_val
348
- ranks = np.where(error == 0, np.finfo(float).max, np.abs(1.0 / error))
349
+ with np.errstate(divide='ignore'):
350
+ ranks = np.where(error == 0, np.finfo(float).max, np.abs(1.0 / error))
349
351
  sorted_indices = np.argsort(-ranks)
350
352
 
351
353
  # Get the top 'sample_size' solutions the user asked for
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polysolve
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: A Python library for representing, manipulating, and solving exponential functions using analytical methods and genetic algorithms, with optional CUDA acceleration.
5
5
  Author-email: Jonathan Rampersad <jonathan@jono-rams.work>
6
6
  License: MIT License
File without changes
File without changes
File without changes