Skip to content

Commit 6c528f7

Browse files
SvenSerneelsclaude
andcommitted
fix np.asfarray removed in NumPy 2.0
Replace np.asfarray with np.asarray. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 14c4fe0 commit 6c528f7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/direpack/ipopt_temp/jacobian.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def log(self, msg):
3636

3737
def jac(self, x, *args, **kwargs):
3838
self.log('G[')
39-
x0 = np.asfarray(x)
39+
x0 = np.asarray(x)
4040
#print x0
4141
dxs = np.zeros((len(x0), len(x0) + 1))
4242
for i in range(len(x0)):
@@ -52,7 +52,7 @@ def jac(self, x, *args, **kwargs):
5252
class FunctionWithApproxJacobianCentral(FunctionWithApproxJacobian):
5353
def jac(self, x, *args, **kwargs):
5454
self.log('G[')
55-
x0 = np.asfarray(x)
55+
x0 = np.asarray(x)
5656
#print x0
5757
dxs = np.zeros((len(x0), 2*len(x0)))
5858
for i in range(len(x0)):

0 commit comments

Comments
 (0)