Skip to content

Commit

Permalink
Fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dhadka committed Sep 18, 2024
1 parent b2419f6 commit 5c69715
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/Basic/dps_example.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import math
import platypus
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import brentq as root
Expand Down Expand Up @@ -28,9 +29,9 @@ def to_variables(self):
result = []

for _ in range(self.length):
result += [Real(self.c_bounds[0], self.c_bounds[1])] # the center
result += [Real(self.r_bounds[0], self.r_bounds[1])] # the radius
result += [Real(0, 1)] # the weight
result += [platypus.Real(self.c_bounds[0], self.c_bounds[1])] # the center
result += [platypus.Real(self.r_bounds[0], self.r_bounds[1])] # the radius
result += [platypus.Real(0, 1)] # the weight

return result

Expand Down
1 change: 1 addition & 0 deletions examples/Basic/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
from scipy.optimize import brentq as root
from rhodium import *

Expand Down
1 change: 1 addition & 0 deletions examples/Eijgenraam/eijgenraam.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import math
import bisect
import numbers
import functools
import numpy as np
import matplotlib.pyplot as plt
from rhodium import *
Expand Down

0 comments on commit 5c69715

Please sign in to comment.