Skip to content

Commit

Permalink
Change to in-place assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
jinningwang committed Aug 19, 2024
1 parent b9a1f14 commit d34a94f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions andes/variables/dae.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@ def set_t(self, t):
"""
Helper function for setting time in-place.
"""

self.t = np.array(t, dtype=float)
# use in-place assignment
self.t[...] = np.array(t, dtype=float)

def get_size(self, name):
"""
Expand Down

0 comments on commit d34a94f

Please sign in to comment.