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

Changing ks2d2s to estat2d raises an error #4

Closed
skoldobskiy opened this issue Dec 20, 2022 · 0 comments
Closed

Changing ks2d2s to estat2d raises an error #4

skoldobskiy opened this issue Dec 20, 2022 · 0 comments

Comments

@skoldobskiy
Copy link

skoldobskiy commented Dec 20, 2022

Hello!

Thanks a lot for python implementation of 2D KS test, it is really helpful!
I also tried to use estat2d, but seems it does not work even for the example given on main page.
Changing ks2d2s to estat2d:

# generate mock samples for the test
np.random.seed(42)
x1, y1 = np.random.randn(2, 100)
x2, y2 = np.random.randn(2, 100)  # same distribution as (x1, y1)

p,en,en_boot = estat2d(x1, y1, x2, y2)
print(f"{p=:.3g}")

raises an error:

    p = (en_boot >= en).sum() / nboot

TypeError: '>=' not supported between instances of 'float' and 'NoneType'

UPD: It was wrong from my side. The function is actually working.

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