Skip to content

Commit

Permalink
Update dimension.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gduscher committed Dec 15, 2024
1 parent d7c0593 commit 2199616
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sidpy/sid/dimension.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ def __array_finalize__(self, obj):

def __array_wrap__(self, out_arr, context=None):
# just call the parent
super(Dimension, self).values.__array_wrap__(self, out_arr, context)
values = super(Dimension, self).__array_wrap__(self, out_arr, context)
new_dim = Dimension(values, name=self.name, quantity=self.quantity, units=self.units)
# return correct values
return out_arr

return new_dim


def __repr__(self):
return '{}: {} ({}) of size {}'.format(self.name, self.quantity, self.units, self.shape)

Expand Down

0 comments on commit 2199616

Please sign in to comment.