Skip to content

Commit

Permalink
fix: weight can be float or int
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Nov 8, 2021
1 parent 9b487fd commit d2c469f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LoopStructural/interpolators/discrete_interpolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def add_constraints_to_least_squares(self, A, B, idc, w = 1., name='undefined'):
mask = np.any(np.isnan(A),axis=1)
A[mask,:] = 0
A[length>0,:] /= length[length>0,None]
if isinstance(w,float):
if isinstance(w,(float,int)):
w = np.ones(A.shape[0])*w

if isinstance(w,np.ndarray) == False:
Expand Down

0 comments on commit d2c469f

Please sign in to comment.