Skip to content

Commit 560d575

Browse files
committed
Data class docstring fixes
1 parent 638845c commit 560d575

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

dabench/data/_barotropic.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class Barotropic(_data.Data):
3636
See https://pyqg.readthedocs.io
3737
3838
Notes:
39+
DEPRECATED
3940
Uses default attribute values from pyqg.BTModel:
4041
https://pyqg.readthedocs.io/en/latest/api.html#pyqg.BTModel
4142
Those values originally come from Mcwilliams 1984:
@@ -207,8 +208,8 @@ def __advance__(self,):
207208
"""Advances the QG model according to set attributes
208209
209210
Returns:
210-
qs (array_like): absolute potential vorticity (relative potential
211-
vorticity + background vorticity).
211+
Array of absolute potential vorticity (relative potential
212+
vorticity + background vorticity).
212213
"""
213214
qs = []
214215
for _ in self.m.run_with_snapshots(tsnapstart=0, tsnapint=self.m.dt):

dabench/data/_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def generate(self,
114114
convergence tolerance, etc.).
115115
116116
Returns:
117-
Xarray Dataset of output vector and (if return_tlm=True)
118-
Xarray DataArray of TLMs corresponding to the system trajectory.
117+
Xarray Dataset of output vector, and if return_tlm=True
118+
Xarray DataArray of TLMs corresponding to the system trajectory.
119119
"""
120120

121121
# Check that n_steps or t_final is supplied
@@ -279,7 +279,7 @@ def calc_lyapunov_exponents_series(
279279
280280
Returns:
281281
Lyapunov exponents for all timesteps, array of size
282-
(total_time/rescale_time - 1, system_dim)
282+
(total_time/rescale_time - 1, system_dim)
283283
"""
284284

285285
# Set total_time

dabench/data/_pyqg.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class PyQG(_data.Data):
3131
See https://pyqg.readthedocs.io
3232
3333
Notes:
34+
DEPRECATED
3435
Uses default attribute values from pyqg.QGModel:
3536
https://pyqg.readthedocs.io/en/latest/api.html#pyqg.QGModel
3637
@@ -191,8 +192,8 @@ def __advance__(self,):
191192
"""Advances the QG model according to set attributes
192193
193194
Returns:
194-
qs (array_like): absolute potential vorticity (relative potential
195-
vorticity + background vorticity).
195+
Array of absolute potential vorticity (relative potential
196+
vorticity + background vorticity).
196197
"""
197198
qs = []
198199
for _ in self.m.run_with_snapshots(tsnapstart=0, tsnapint=self.m.dt):

dabench/data/_qgs.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,11 @@ def rhs(self,
124124
"""Vector field (tendencies) of qgs system
125125
126126
Args:
127-
x: State vector, shape: (system_dim)
127+
x: State vector of size (system_dim)
128128
t: times vector. Required as argument slot for some numerical
129129
integrators but unused.
130130
Returns:
131131
Vector field of qgs
132-
133132
"""
134133

135134
dx = self.f(t, x)
@@ -143,13 +142,12 @@ def Jacobian(self,
143142
"""Jacobian of the qgs system
144143
145144
Args:
146-
x: State vector, shape: (system_dim)
145+
x: State vector of size (system_dim)
147146
t: times vector. Required as argument slot for some numerical
148147
integrators but unused.
149148
150149
Returns:
151-
J: Jacobian matrix, shape: (system_dim, system_dim)
152-
150+
Jacobian matrix of size (system_dim, system_dim)
153151
"""
154152

155153
J = self.Df(t, x)
@@ -187,8 +185,8 @@ def generate(self,
187185
convergence tolerance, etc.).
188186
189187
Returns:
190-
Xarray Dataset of output vector and (if return_tlm=True)
191-
Xarray DataArray of TLMs corresponding to the system trajectory.
188+
Xarray Dataset of output vector, and if return_tlm=True
189+
Xarray DataArray of TLMs corresponding to the system trajectory.
192190
"""
193191

194192
# Check that n_steps or t_final is supplied
@@ -294,7 +292,7 @@ def rhs_aux(self,
294292
t: Array of times with size (time_dim)
295293
296294
Returns:
297-
State vector [size: (system_dim,)]
295+
State vector of size (system_dim,)
298296
"""
299297
# Compute M
300298
dxdt = self.rhs(x[:self.system_dim], t)
@@ -351,7 +349,7 @@ def calc_lyapunov_exponents_series(
351349
352350
Returns:
353351
Lyapunov exponents for all timesteps, array of size
354-
(total_time/rescale_time - 1, system_dim)
352+
(total_time/rescale_time - 1, system_dim)
355353
"""
356354
# Set total_time
357355
if total_time is None:

0 commit comments

Comments
 (0)