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

Indexing error leads to crash when maximum of G is the first value #8

Closed
OskarHofmann opened this issue Jan 21, 2021 · 1 comment
Closed

Comments

@OskarHofmann
Copy link

I wanted to run the script on my data but always got the error
"ValueError: zero-size array to reduction operation minimum which has no identity" in line 107 of ampd.py

The issue is that the largest value in G (for my data) is the first one and thus
l_scale = np.argmax(G)
leads to l_scale = 0

In line 107 the array LSM is reduced to
LSM[0:l_scale, :]
But as l_scale = 0 this leads to an empty array and an error when trying to to use np.min on it.

I think line 107 should be
pks_logical = np.min(LSM[0:l_scale+1, :], axis=0)

@OskarHofmann
Copy link
Author

Issue is already mentioned in Issue #6

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