Closed thsutton closed 6 years ago
Oh, and it's a debug build from 1688d12c0d327a3bdd31489df9abbcd479384067
Hello, for now it seems that the problem is in my code, in Hera. Thanks for reporting. Can you send the diagrams x and y that cause the failure to me ( nigmetov e-mail symbol tugraz dot at)? You can do #####################################
f_x = open("dgm_x.txt", "w")
# I don't know exactly how to extract coords from x, y, something like that
# might work. If not, I hope it should be easy to modify the next line appropriately
for a, b in x:
f_x.write("%f %f\n" % (a, b))
f_x.close()
f_y = open("dgm_y.txt", "w")
for a, b in y:
f_y.write("%f %f\n" % (a, b))
f_y.close()
##################################### to save the data to the files dgm_x.txt and dgm_y.txt, and I only need these two files.
I emailed files of the two failing diagrams to @grey-narn.
OK, the fix was easy: the diagrams have the same number of points at infinity and no finite points, so I added
if (A.empty() and B.empty()) return 0.0;
to wasserstein_cost_vec function before calling auction, and pushed the commit to the public Hera repo (added several test cases, too). Dmitry, now you can pull the code to Dionysus. Thanks again to @thsutton for reporting.
Thanks, @grey-narn!
I'm attempting to use
dionysus.wasserstein_distance
to compare a bunch of diagrams but have run into a crash due to a failed assertion in the C++ code.My Python code looks a bit like this (after I remove a bunch of control flow, etc):
This is an assignment but I can make the code and data available by privately if required.