Skip to content

Commit 4fdea81

Browse files
Use value and __with_value.
Co-authored-by: Noureldin <noureldinyosri@gmail.com>
1 parent 422ad7b commit 4fdea81

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tunits/core/cython/with_unit_value_array.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class ValueArray(WithUnit):
151151
return np.allclose(self.value, other[self.unit], *args, **kw)
152152

153153
def unique(WithUnit self):
154-
return np.unique(self[self.unit]) * self.unit
154+
return self.__with_value(np.unique(self.value))
155155

156156
@classmethod
157157
def from_proto(cls: type[T], msg: 'tunits_pb2.ValueArray') -> T:

0 commit comments

Comments
 (0)