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

Error when computing the incidence matrix of rank 2 on SHREC dataset #167

Closed
abdelwahed opened this issue Jun 15, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@abdelwahed
Copy link

I tried to call the SimplicialComplex.incidence_matrix (rank 2) on the shrec dataset using the code below

import toponetx.datasets as datasets

shrec, _ = datasets.mesh.shrec_16(size="small")
simplexes = shrec["complexes"]
print(simplexes[0].incidence_matrix(rank=2))

I get the following error (KeyError)

 File "/snap/pycharm-professional/336/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/kha053/PycharmProjects/TopoNetX/tutorials/test.py", line 19, in <module>
    print(simplexes[0].incidence_matrix(rank=2))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kha053/PycharmProjects/TopoNetX/toponetx/classes/simplicial_complex.py", line 783, in incidence_matrix
    idx_faces.append(simplex_dict_d_minus_1[tuple(face)])
                     ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: (89, 81)

Similar errors are shown for SimplicialComplex.up_laplacian_matrix and SimplicialComplex.down_laplacian_matrix.

@ffl096
Copy link
Member

ffl096 commented Jun 15, 2023

I think this is a duplicate of #154 and should be fixed when #155 is merged.

@ffl096 ffl096 added the bug Something isn't working label Jun 15, 2023
@mhajij
Copy link
Member

mhajij commented Jun 17, 2023

@abdelwahed this has been addressed now. Please pull the new version.

@abdelwahed
Copy link
Author

Thanks @mhajij

@ffl096 ffl096 closed this as completed Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants