Skip to content

Commit

Permalink
improved docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
BalzaniEdoardo committed May 21, 2024
1 parent 2904cba commit 183a951
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pynapple/core/time_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,29 +228,31 @@ def __array_function__(self, func, types, args, kwargs):

def as_array(self):
"""
Return the data as a numpy.ndarray
Return the data.
Returns
-------
out: numpy.ndarray
out: array-like
_
"""
return self.values

def data(self):
"""
Return the data as a numpy.ndarray
Return the data.
Returns
-------
out: numpy.ndarray
out: array-like
_
"""
return self.values

def to_numpy(self):
"""
Return the data as a numpy.ndarray. Mostly useful for matplotlib plotting when calling `plot(tsd)`
Return the data as a numpy.ndarray.
Mostly useful for matplotlib plotting when calling `plot(tsd)`.
"""
return np.asarray(self.values)

Expand Down

0 comments on commit 183a951

Please sign in to comment.