it happened when i changed
from sklearn.utils.linear_assignment_ import linear_assignment to from scipy.optimize import linear_sum_assignment as linear_assignment because sklearn's linear_assignment has been removed starting with version "0.23.0" and higher.
Then I got the error:TypeError: tuple indices must be integers or slices, not tuple on 【linear_assignment.py", line 63】
if col not in indices[:, 1]:
I tried to change indices[:, 1] to np.array(indices)[:, 1],it worked but I got indices:[[0],[0]](as a result indices[:, 1] went wrong: out of index) because of the previous indices is (array([0], dtype=int64), array([0], dtype=int64))
I could not figure out what happened, could someone give me a hand?
it happened when i changed
from sklearn.utils.linear_assignment_ import linear_assignment
tofrom scipy.optimize import linear_sum_assignment as linear_assignment
because sklearn's linear_assignment has been removed starting with version "0.23.0" and higher.Then I got the error:
TypeError: tuple indices must be integers or slices, not tuple
on 【linear_assignment.py", line 63】if col not in indices[:, 1]:
I tried to change
indices[:, 1]
tonp.array(indices)[:, 1]
,it worked but I gotindices
:[[0],[0]](as a resultindices[:, 1]
went wrong: out of index) because of the previousindices
is (array([0], dtype=int64), array([0], dtype=int64))I could not figure out what happened, could someone give me a hand?