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

cannot convert float infinity to integer #21

Closed
ghost opened this issue Nov 3, 2020 · 1 comment
Closed

cannot convert float infinity to integer #21

ghost opened this issue Nov 3, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 3, 2020

hi,
When i call nolds.lay_e with my datas, i got "cannot convert float infinity to integer" because of "diffs[i] = float('inf')" in the code. Do you tell me how to fix it ?

Thanks !

@CSchoel
Copy link
Owner

CSchoel commented Nov 7, 2020

Are your input data integers? If so, you will need to convert them to a float array:

data = numpy.asarray(data, dtype=numpy.float32)

I will fix this in the future by adding the dtype argument to the asarray call that is already issued in lyap_e.

@CSchoel CSchoel closed this as completed May 30, 2021
CSchoel added a commit that referenced this issue May 30, 2021
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

1 participant