MrGolden1/sort-python

succeeded in making a pip build by adding cls information, but stopped at the run function. What is the reason?

Closed this issue · 5 comments

succeeded in making a pip build by adding cls information, but stopped at the run function. What is the reason?

Is there any error? can you share the code ?

Oh, I solved that part
What I'm curious about is that when you do sort.run, can't type numpy into int32, but have to type int64.
so can you look at the issue?

I tested. sort.run works with both int32 and int64. Can you explain more?

Yes, for example, the int64 input is
My environment is 'numpy==1.21.6'

import numpy as np
from sort import SORT

track = SORT(3,1)

track.run(np.array([[10,20,30,40]]),2)

output = track.get_tracks(2)

print(output) # [[ 0 10 20 30 40]]

However, if cast Int32 by force, get the price of garbage

import numpy as np
from sort import SORT

print(np.__version__)

track = SORT(3,1)
track.run(np.array([[10,20,30,40]], dtype=np.int32),2)

output = track.get_tracks(2)

print(output) # [[          0 -1029959296          30 -1029959296          33]]

Oh, yes I got the same result. I'll check it. thanks!