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

Python 3 numpy warnings #11

Open
willblatt opened this issue Aug 30, 2017 · 4 comments
Open

Python 3 numpy warnings #11

willblatt opened this issue Aug 30, 2017 · 4 comments

Comments

@willblatt
Copy link

In Python 3.6.0, numpy 1.11.3, the following warnings appear:

C:\Users\######\AppData\Local\Continuum\Anaconda3\lib\site-packages\pydoe-0.3.8-py3.6.egg\pyDOE\doe_repeat_center.py:43: VisibleDep
recationWarning: using a non-integer number instead of an integer will result in an error in the future
.C:\Users\######\AppData\Local\Continuum\Anaconda3\lib\site-packages\pydoe-0.3.8-py3.6.egg\pyDOE\doe_factorial.py:78: VisibleDeprec
ationWarning: using a non-integer number instead of an integer will result in an error in the future

At least one of them appears to be due to this line in bbdesign:
nb_lines = (n*(n-1)/2)*H_fact.shape[0]

@NicolasDumoulin
Copy link

This line throws an error on my jupyter notebook (docker jupyter/minimal-notebook).
notebook server 5.0.0
Python 3.5.2
IPython 6.1.0

In [2]: ff2n(3)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-a3c6381f1eac> in <module>()
----> 1 ff2n(3)

/opt/conda/lib/python3.5/site-packages/pyDOE/doe_factorial.py in ff2n(n)
    113 
    114     """
--> 115     return 2*fullfact([2]*n) - 1
    116 
    117 ################################################################################

/opt/conda/lib/python3.5/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: 'numpy.float64' object cannot be interpreted as an integer

@NicolasDumoulin
Copy link

Fixed by using willblatt's fork:
pip install git+https://github.com/willblatt/pyDOE
Thanks

@swryan
Copy link

swryan commented Apr 23, 2018

FWIW: I have found that there is now a pyDOE2 on pypi that is being maintained

@chengzhan
Copy link

Glad to see that pyDOE2 is available!!

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

4 participants