Skip to content

Commit

Permalink
Replaced deprecated np.object with object
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-lindemann committed Jun 2, 2023
1 parent 97be421 commit 6ee1453
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chesscog/recognition/recognition.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _classify_pieces(self, img: np.ndarray, turn: chess.Color, corners: np.ndarr
pieces = self._pieces_model(piece_imgs)
pieces = pieces.argmax(axis=-1).cpu().numpy()
pieces = self._piece_classes[pieces]
all_pieces = np.full(len(self._squares), None, dtype=np.object)
all_pieces = np.full(len(self._squares), None, dtype=object)
all_pieces[occupancy] = pieces
return all_pieces

Expand Down

0 comments on commit 6ee1453

Please sign in to comment.