Skip to content

Commit 9d20f4f

Browse files
committed
small updates
1 parent a95b3e5 commit 9d20f4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/amuse/units/quantities.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def is_vector(self):
103103
return False
104104

105105
def __repr__(self):
106-
return "quantity<" + str(self) + ">"
106+
return f"quantity<{self}>"
107107

108108
def __add__(self, other):
109109
if self.unit.is_zero():
@@ -1199,7 +1199,7 @@ def __str__(self):
11991199
return self.unit.value_to_string(self.value)
12001200

12011201
def __repr__(self):
1202-
return f"quantity<{str(self.value)} - {str(self)}>"
1202+
return f"quantity<{self.value} - {self}>"
12031203

12041204
def as_vector_with_length(self, length):
12051205
return VectorQuantity(numpy.array([self.value] * length), self.unit)

0 commit comments

Comments
 (0)