aports/community/py3-opfunu/new-numpy.patch
2023-04-20 12:35:17 +02:00

47 lines
2.2 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Patch-Source: https://github.com/thieu1995/opfunu/pull/12
--
From 61ad94274896047410f37bf78f5acfa5a71f2efa Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Sat, 25 Feb 2023 11:02:17 -0500
Subject: [PATCH] Do not import numpy.int, which was deprecated and removed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This has always just aliased Pythons built-in int type; it was
deprecated in 1.20.0
(https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations) and
removed in 1.24.0
(https://numpy.org/devdocs/release/1.24.0-notes.html#expired-deprecations).
We simply omit the import and use the built-in int type directly.
---
opfunu/cec/cec2020/engineering.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/opfunu/cec/cec2020/engineering.py b/opfunu/cec/cec2020/engineering.py
index 6d4ded4..0bd46db 100644
--- a/opfunu/cec/cec2020/engineering.py
+++ b/opfunu/cec/cec2020/engineering.py
@@ -4,13 +4,13 @@
# %
# Email: nguyenthieu2102@gmail.com %
# Homepage: https://www.researchgate.net/profile/Thieu_Nguyen6 %
-# Github: https://github.com/thieu1995 %
-# -------------------------------------------------------------------------------------------------------%
-
-from numpy import zeros, array, log, abs, exp, sqrt, pi, round, sin, cos, arccos, remainder, arcsin, int, arctan, imag, log10
-from scipy.optimize import fminbound
-from opfunu.cec.cec2020 import constant
-
+# Github: https://github.com/thieu1995 %
+# -------------------------------------------------------------------------------------------------------%
+
+from numpy import zeros, array, log, abs, exp, sqrt, pi, round, sin, cos, arccos, remainder, arcsin, arctan, imag, log10
+from scipy.optimize import fminbound
+from opfunu.cec.cec2020 import constant
+
# Industrial Chemical Processes
def p1(x):