From f15d69d8c00edab01ee9df88dfe4ebc440320b38 Mon Sep 17 00:00:00 2001 From: "Matthew N. White" Date: Tue, 3 Sep 2024 16:09:12 -0400 Subject: [PATCH] Delete asterisk in derivative methods of IdentityFunction There has been an errant asterisk in the arguments of the (trivial) derivative method functions for IdentityFunction for an unknown amount of time. These methods did not work, and apparently were never tested. --- HARK/interpolation.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/HARK/interpolation.py b/HARK/interpolation.py index 62b08b0e2..5afcb9ea1 100644 --- a/HARK/interpolation.py +++ b/HARK/interpolation.py @@ -611,9 +611,9 @@ def derivative(self, *args): Returns the derivative of the function with respect to the first dimension. """ if self.i_dim == 0: - return np.ones_like(*args[0]) + return np.ones_like(args[0]) else: - return np.zeros_like(*args[0]) + return np.zeros_like(args[0]) def derivativeX(self, *args): """ @@ -625,9 +625,9 @@ def derivativeX(self, *args): else: j = 0 if self.i_dim == j: - return np.ones_like(*args[0]) + return np.ones_like(args[0]) else: - return np.zeros_like(*args[0]) + return np.zeros_like(args[0]) def derivativeY(self, *args): """ @@ -639,9 +639,9 @@ def derivativeY(self, *args): else: j = 1 if self.i_dim == j: - return np.ones_like(*args[0]) + return np.ones_like(args[0]) else: - return np.zeros_like(*args[0]) + return np.zeros_like(args[0]) def derivativeZ(self, *args): """ @@ -653,9 +653,9 @@ def derivativeZ(self, *args): else: j = 2 if self.i_dim == j: - return np.ones_like(*args[0]) + return np.ones_like(args[0]) else: - return np.zeros_like(*args[0]) + return np.zeros_like(args[0]) def derivativeW(self, *args): """ @@ -669,9 +669,9 @@ def derivativeW(self, *args): False ), "Derivative with respect to W can't be called when n_dims < 4!" if self.i_dim == j: - return np.ones_like(*args[0]) + return np.ones_like(args[0]) else: - return np.zeros_like(*args[0]) + return np.zeros_like(args[0]) class ConstantFunction(MetricObject):