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

Nan in metric cost matrix causes 'segmentation fault core dumped' for GW solver #469

Open
KrzakalaPaul opened this issue May 3, 2023 · 2 comments · May be fixed by #623
Open

Nan in metric cost matrix causes 'segmentation fault core dumped' for GW solver #469

KrzakalaPaul opened this issue May 3, 2023 · 2 comments · May be fixed by #623

Comments

@KrzakalaPaul
Copy link
Contributor

KrzakalaPaul commented May 3, 2023

Bug

Hello!
When there is a nan in the metric cost matrix (gromov_wasserstein or fused_gromov_wasserstein) I get a 'segmentation fault core dumped' error.

Code sample

import numpy as np
from ot import gromov_wasserstein2

C1 = np.zeros((2,2))
C2 = np.ones((2,2))
p = np.array([0.5,0.5])
q = np.array([0.5,0.5])

gromov_wasserstein2(C1, C2, p, q)

C1[0,0]=np.nan

gromov_wasserstein2(C1, C2, p, q)

Expected behavior

I would expect a more clear warning/error or even that gromov_wasserstein2 returns a nan.

@rflamary rflamary changed the title nan in metric cost matrix causes 'segmentation fault core dumped' nan in metric cost matrix causes 'segmentation fault core dumped' for GW solver May 5, 2023
@rflamary rflamary changed the title nan in metric cost matrix causes 'segmentation fault core dumped' for GW solver Nan in metric cost matrix causes 'segmentation fault core dumped' for GW solver May 5, 2023
@bobluppes
Copy link

Hi, I would be interested in working on this!
Could you please assign it to me?

@rflamary
Copy link
Collaborator

OK great! Feel free to cone POT and work on it the do a PR so that we can look at the code and discus it.

@bobluppes bobluppes linked a pull request May 17, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants