r"""Returns the standard deviation of the scalars that were accumulated for the given statistic between the last two calls to `update()`, or NaN if no scalars were collected.
(self, name)
| 198 | return float(delta[1] / delta[0]) |
| 199 | |
| 200 | def std(self, name): |
| 201 | r"""Returns the standard deviation of the scalars that were |
| 202 | accumulated for the given statistic between the last two calls to |
| 203 | `update()`, or NaN if no scalars were collected. |
| 204 | """ |
| 205 | delta = self._get_delta(name) |
| 206 | if int(delta[0]) == 0 or not np.isfinite(float(delta[1])): |
| 207 | return float('nan') |
| 208 | if int(delta[0]) == 1: |
| 209 | return float(0) |
| 210 | mean = float(delta[1] / delta[0]) |
| 211 | raw_var = float(delta[2] / delta[0]) |
| 212 | return np.sqrt(max(raw_var - np.square(mean), 0)) |
| 213 | |
| 214 | def as_dict(self): |
| 215 | r"""Returns the averages accumulated between the last two calls to |
no test coverage detected