mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
24 lines
803 B
Plaintext
24 lines
803 B
Plaintext
From 48799c6eccab89fc02289d7c0a79bf7fe0262328 Mon Sep 17 00:00:00 2001
|
|
From: Oscar Lesta <oscar.lesta@gmail.com>
|
|
Date: Tue, 7 Jan 2025 09:14:54 -0300
|
|
Subject: Fix crash with numpy 2.x
|
|
|
|
Slightly modified from an upstream fix.
|
|
|
|
diff --git a/singularity/code/buyable.py b/singularity/code/buyable.py
|
|
index 57111db..fa16136 100644
|
|
--- a/singularity/code/buyable.py
|
|
+++ b/singularity/code/buyable.py
|
|
@@ -183,7 +183,7 @@ class Buyable(object):
|
|
|
|
# And apply it.
|
|
was_complete = self.cost_paid
|
|
- cost_paid = numpy.maximum(numpy.cast[int64](numpy.round(raw_paid)),
|
|
+ cost_paid = numpy.maximum(numpy.asarray(numpy.round(raw_paid), dtype=int64),
|
|
was_complete)
|
|
spent = cost_paid - was_complete
|
|
return spent, cost_paid
|
|
--
|
|
2.45.2
|
|
|