We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I get the following TypeError with newer versions of Python. Any suggestions how to fix this?
Kind regards, e-neu
pyDOE.fullfact([1, 2])
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-65-d26355a11123> in <module>() ----> 1 pyDOE.fullfact([1, 2]) C:\Users\XXX\AppData\Roaming\Python\Python35\site-packages\pydoe-0.3.8-py3.5.egg\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
import sys sys.version
'3.5.2 |Anaconda custom (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]'
import pyDOE pyDOE.__version__
'0.3.8'
The text was updated successfully, but these errors were encountered:
Ok, I looked into it and the solution seems to be quite simple. Just change the float division
range_repeat /= levels[i]
into a integer division.
range_repeat //= levels[i]
I've only recently started using Python, so I am not sure how this will affect earlier Python versions.
Sorry, something went wrong.
Merge pull request #9 from joergdietrich/#8
4361437
enforce integer division
No branches or pull requests
Hi,
I get the following TypeError with newer versions of Python. Any suggestions how to fix this?
Kind regards,
e-neu
pyDOE.fullfact([1, 2])
The text was updated successfully, but these errors were encountered: