-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #75 from regro-cf-autotick-bot/1.3.0_hf95e54
cvxpy v1.3.0
- Loading branch information
Showing
4 changed files
with
71 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 7d087d5781a5e9deaf3e4459376d93d5d700e4b0 Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <[email protected]> | ||
Date: Wed, 4 Jan 2023 15:17:01 +1100 | ||
Subject: [PATCH 1/2] fix relative import | ||
|
||
--- | ||
cvxpy/tests/test_perspective.py | 3 +-- | ||
1 file changed, 1 insertion(+), 2 deletions(-) | ||
|
||
diff --git a/cvxpy/tests/test_perspective.py b/cvxpy/tests/test_perspective.py | ||
index 957c0683b..e7d841008 100644 | ||
--- a/cvxpy/tests/test_perspective.py | ||
+++ b/cvxpy/tests/test_perspective.py | ||
@@ -18,10 +18,9 @@ import numpy as np | ||
import pytest | ||
|
||
import cvxpy as cp | ||
+from cvxpy.atoms.perspective import perspective | ||
from cvxpy.constraints.exponential import ExpCone | ||
|
||
-from ..atoms.perspective import perspective | ||
- | ||
|
||
def test_monotonicity(): | ||
x = cp.Variable(nonneg=True) | ||
-- | ||
2.38.1.windows.1 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From eded1ed71728208e72528edae09f500d5ed10108 Mon Sep 17 00:00:00 2001 | ||
From: "H. Vetinari" <[email protected]> | ||
Date: Wed, 4 Jan 2023 15:47:54 +1100 | ||
Subject: [PATCH 2/2] do not use __builtins__ as dict | ||
|
||
--- | ||
cvxpy/atoms/affine/sum.py | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/cvxpy/atoms/affine/sum.py b/cvxpy/atoms/affine/sum.py | ||
index 380239af9..dfdba0ad4 100644 | ||
--- a/cvxpy/atoms/affine/sum.py | ||
+++ b/cvxpy/atoms/affine/sum.py | ||
@@ -13,6 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
""" | ||
+import builtins | ||
from functools import wraps | ||
from typing import List, Optional, Tuple | ||
|
||
@@ -109,6 +110,6 @@ def sum(expr, axis: Optional[int] = None, keepdims: bool = False): | ||
"""Wrapper for Sum class. | ||
""" | ||
if isinstance(expr, list): | ||
- return __builtins__['sum'](expr) | ||
+ return builtins.sum(expr) | ||
else: | ||
return Sum(expr, axis, keepdims) | ||
-- | ||
2.38.1.windows.1 | ||
|