microsoft / Graphormer

Graphormer is a general-purpose deep learning backbone for molecular modeling.
MIT License
2.08k stars 334 forks source link

problem when using algos.pyx #42

Closed jamesYu365 closed 2 years ago

jamesYu365 commented 2 years ago

Hello, I got a problem while using https://github.com/microsoft/Graphormer/blob/main/graphormer/algos.pyx Here is the error :

Traceback (most recent call last):

  File "C:\Users\James\AppData\Local\Temp/ipykernel_1060/863204263.py", line 1, in <module>
    shortest_path_result, path = algos.floyd_warshall(adj.numpy())

  File "algos.pyx", line 19, in algos.floyd_warshall
    cdef numpy.ndarray[long, ndim=2, mode='c'] path = numpy.zeros([n, n], dtype=numpy.int64)

ValueError: Buffer dtype mismatch, expected 'long' but got 'long long'

I'm using Windows-64bit and Python 3.8.2. Numpy version is 1.21.2

zhengsx commented 2 years ago

It seems that the data type defination has gap between linux and Windows. Will you try on a linux server since we have not tested our code on Windoes.

jamesYu365 commented 2 years ago

Thanks, as you said, I work it on a linux machine and it works!

zhengsx commented 2 years ago

Close this issue due to inactive. Feel free to raise a new one or reopen this one for any further question.