mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
47 lines
2.2 KiB
Diff
47 lines
2.2 KiB
Diff
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 Python’s 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):
|