Skip to content

Commit

Permalink
fix ValueError: Buffer dtype mismatch, expected 'int_t' but got 'long…
Browse files Browse the repository at this point in the history
… long'

at self.min_cost = compute(self.n, self.c, self._x, self._y, self.epsilon)
  • Loading branch information
janosh committed Jan 9, 2023
1 parent ce9fe2e commit 856bfb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymatgen/optimization/linear_assignment.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ class LinearAssignment:
self.c[:self.nx] = self.orig_c

# initialize solution vectors
self._x = np.empty(self.n, dtype=np.int64)
self._y = np.empty(self.n, dtype=np.int64)
self._x = np.empty(self.n, dtype=int)
self._y = np.empty(self.n, dtype=int)

self.min_cost = compute(self.n, self.c, self._x, self._y, self.epsilon)
self.solution = self._x[:self.nx]
Expand Down

0 comments on commit 856bfb5

Please sign in to comment.