Skip to content

Commit

Permalink
endow Keyframe with label attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarx committed Dec 13, 2023
1 parent f0a78dc commit 914d974
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/keyframed/curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ def __init__(
value,
interpolation_method:Optional[Union[str,Callable]]=None,
interpolator_arguments=None,
label=None,
):
self.t=t
self.label = label
#self.value=value
### <chatgpt>
#if isinstance(value, np.ndarray):
Expand Down Expand Up @@ -168,6 +170,8 @@ def _to_dict(self, *args, **kwargs) -> dict:
d = {'t':self.t, 'value':self.value, 'interpolation_method':self.interpolation_method}
if self.interpolator_arguments:
d['interpolator_arguments'] = self.interpolator_arguments
if self.label is not None:
d['label'] = self.label
### <chatgpt>
# Ensure the representation of numpy arrays and tensors are handled correctly
#if isinstance(self.value, np.ndarray):
Expand Down

0 comments on commit 914d974

Please sign in to comment.