Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bbdesign not working in python 3.8.5 #30

Open
kakila opened this issue Mar 7, 2021 · 3 comments
Open

bbdesign not working in python 3.8.5 #30

kakila opened this issue Mar 7, 2021 · 3 comments

Comments

@kakila
Copy link

kakila commented Mar 7, 2021

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'

@manuel-masiello
Copy link

@francoisbres
Copy link

with python 3, you have to install pydoe2 instead of pydoe

from pyDOE2 import fullfact, ff2n, fracfact, fold, pbdesign, bbdesign, ccdesign, lhs
bbdesign(3)

@manuel-masiello
Copy link

manuel-masiello commented Jan 12, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants