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

healthdemo/ecg_streaming.py attempts to use a float as an int, which is not tolerated by later versions of Python or python packages #156

Closed
pcbye opened this issue Aug 8, 2019 · 2 comments

Comments

@pcbye
Copy link

pcbye commented Aug 8, 2019

When attempting to use a newer version of some python packages within Python 3.5, the following error occurs when running the healthcare demo sample:

healthdemo/ecg_streaming.py", line 39, in preprocess_MA_filtfilt
tup['__algo_vars']['b'] = np.ones(tup['sampling_rate'] / 35.) / 35.
File "/usr/IBM/anaconda3/lib/python3.5/site-packages/numpy/core/numeric.py", line 192, in ones
a = empty(shape, dtype, order)
TypeError: 'float' object cannot be interpreted as an integer

It appears that this line is attempting to use the integer "divide" ( / ) operator on a float value, which seems to be tolerated by earlier versions of the package being used, but not later versions. Suggestions found doing a search are that the code should use "//" instead of "/" as the divide operator.

@natashadsilva
Copy link
Member

Fixed by PR #158

@pcbye
Copy link
Author

pcbye commented Apr 6, 2020

Thank you. Closing.

@pcbye pcbye closed this as completed Apr 6, 2020
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

2 participants