pyDOE
pyDOE copied to clipboard
bbdesign not working in python 3.8.5
bbdesing is not working on Python 3.8.5
This is the error if I try to run the example in the docstring
----> 1 doe.bbdesign(3)
~/virtual_enviroments/hamopt/lib/python3.8/site-packages/pyDOE/doe_box_behnken.py in bbdesign(n, center)
64
65 # First, compute a factorial DOE with 2 parameters
---> 66 H_fact = ff2n(2)
67 # Now we populate the real DOE with this DOE
68
~/virtual_enviroments/hamopt/lib/python3.8/site-packages/pyDOE/doe_factorial.py in ff2n(n)
113
114 """
--> 115 return 2*fullfact([2]*n) - 1
116
117 ################################################################################
~/virtual_enviroments/hamopt/lib/python3.8/site-packages/pyDOE/doe_factorial.py in fullfact(levels)
76 for j in range(levels[i]):
77 lvl += [j]*level_repeat
---> 78 rng = lvl*range_repeat
79 level_repeat *= levels[i]
80 H[:, i] = rng
TypeError: can't multiply sequence by non-int of type 'numpy.float64'
Same Issue. You can test here: https://colab.research.google.com/drive/1paIe2xzREicgILvJSsE7PLlcRXbLNMJu#scrollTo=5rI7gtaEeDdp
with python 3, you have to install pydoe2 instead of pydoe
from pyDOE2 import fullfact, ff2n, fracfact, fold, pbdesign, bbdesign, ccdesign, lhs
bbdesign(3)
Hello @francoisbres thx for your help.
Yes. It's works using :
!pip install pyDOE2
from pyDOE2 import fullfact, ff2n, fracfact, fold, pbdesign, bbdesign, ccdesign, lhs
bbdesign(3)
Colab exemple: https://colab.research.google.com/drive/1paIe2xzREicgILvJSsE7PLlcRXbLNMJu?usp=sharing
Best, Manuel