Skip to content

Commit

Permalink
added latex and implemented StringVector outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacanchaplais committed Sep 11, 2024
1 parent 277acfc commit 6416e5f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions graphicle/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1239,14 +1239,14 @@ def __get_prop_range(self, field: str) -> base.VoidVector:
return props # type: ignore

@property
def name(self) -> base.ObjVector:
def name(self) -> base.StringVector:
# 19 is the length of longest name
return self.__get_prop("name").astype("<U19")
return self.__get_prop("name").astype(np.str_)

@property
def latex(self) -> ty.List[str]:
def latex(self) -> base.StringVector:
# 32 is the length of longest name
return self.__get_prop("latex").tolist()
return self.__get_prop("latex").astype(np.str_)

@property
def charge(self) -> base.DoubleVector:
Expand All @@ -1265,8 +1265,8 @@ def mass_bounds(self) -> base.VoidVector:
return range_arr

@property
def quarks(self) -> base.ObjVector:
return self.__get_prop("quarks")
def quarks(self) -> base.StringVector:
return self.__get_prop("quarks").astype(np.str_)

@property
def width(self) -> base.DoubleVector:
Expand Down

0 comments on commit 6416e5f

Please sign in to comment.