Skip to content

Commit

Permalink
Convert J_full to array, not matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
A-CGray committed Apr 7, 2024
1 parent 73afc54 commit 51ec937
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pygeo/parameterization/DVGeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,9 +1518,8 @@ def addCompositeDV(self, dvName, ptSetName=None, u=None, scale=None, prependName
if ptSetName is None:
raise ValueError("If u and s need to be computed, you must specify the ptSetName")
self.computeTotalJacobian(ptSetName)
J_full = self.JT[ptSetName].todense() # this is in CSR format but we convert it to a dense matrix
J_full = self.JT[ptSetName].toarray() # this is in CSR format but we convert it to a dense matrix
u, s, _ = np.linalg.svd(J_full, full_matrices=False)
u = np.array(u)
scale = np.sqrt(s)
# normalize the scaling
scale = scale * (NDV / np.sum(scale))
Expand Down

0 comments on commit 51ec937

Please sign in to comment.