mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 07:28:21 +08:00
Opt: Remove redundant converts from pillow to numpy
This commit is contained in:
@@ -223,7 +223,7 @@ class SelectedGrids:
|
||||
if not self:
|
||||
return self
|
||||
location = np.array(self.location)
|
||||
diff = np.sum(np.abs(np.array(location) - camera), axis=1)
|
||||
diff = np.sum(np.abs(location - camera), axis=1)
|
||||
# grids = [x for _, x in sorted(zip(diff, self.grids))]
|
||||
grids = tuple(np.array(self.grids)[np.argsort(diff)])
|
||||
return SelectedGrids(grids)
|
||||
|
||||
Reference in New Issue
Block a user