Skip to content

Commit

Permalink
fix docstrings in libmagic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tgastine committed Apr 4, 2024
1 parent be957bf commit eed9824
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions python/magic/libmagic.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,7 @@ def timeder(time,y):
computed with central differences (numpy.gradient)
>>> ts = MagicTs(field='e_kin')
>>> dt_ekinpol = timeder(ts,field='ekin_pol')
>>> dt_ekinpol = timeder(ts, ts.ekin_pol)
"""
out = np.gradient(y, time, edge_order=1)

Expand All @@ -743,11 +742,11 @@ def secondtimeder(time,y):
computed with central differences (numpy.gradient)
>>> ts = MagicTs(field='e_kin')
>>> dt_ekinpol = secondtimeder(ts,field='ekin_pol')
>>> dt_ekinpol = secondtimeder(ts, ts.ekin_pol)
"""
tmp = np.gradient(y, time, edge_order=1)
out = np.gradient(tmp, time, edge_order=1)

return out

def phideravg(data, minc=1, order=4):
Expand Down

0 comments on commit eed9824

Please sign in to comment.