File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -460,6 +460,11 @@ def __getitem__(self, name: str) -> Rprof:
460460
461461 return Rprof (rprof , rad , meta )
462462
463+ @property
464+ def stepstr (self ) -> str :
465+ """String representation of the parent :class:`Step`."""
466+ return str (self .step .istep )
467+
463468 @crop
464469 def centers (self ) -> ndarray :
465470 """Radial position of cell centers."""
Original file line number Diff line number Diff line change @@ -21,10 +21,7 @@ def plot_rprofs(rprofs: _Rprofs, names: str):
2121 names: profile names separated by ``-`` (figures), ``.`` (subplots) and
2222 ``,`` (same subplot).
2323 """
24- try :
25- stepstr = rprofs .steps .stepstr
26- except AttributeError :
27- stepstr = str (rprofs .step .istep )
24+ stepstr = rprofs .stepstr
2825 sdat = rprofs .step .sdat
2926
3027 for vfig in _helpers .list_of_vars (names ):
Original file line number Diff line number Diff line change @@ -334,6 +334,11 @@ def __getitem__(self, name: str) -> Rprof:
334334 self ._cached_data [name ] = Rprof (rprof , rad , meta )
335335 return self ._cached_data [name ]
336336
337+ @property
338+ def stepstr (self ) -> str :
339+ """String representation of steps indices."""
340+ return self .steps .stepstr
341+
337342
338343class _Steps :
339344 """Collections of time steps.
You can’t perform that action at this time.
0 commit comments