Stairs.
cov
(other, lower=-inf, upper=inf)¶Calculates the covariance between two step functions described by self and other.
Parameters: |
|
---|---|
Returns: | The covariance between self and other |
Return type: | float |
See also
Examples
>>> fig, axes = plt.subplots(nrows=1, ncols=2, figsize=(12,5), sharey=True, sharex=True)
>>> for ax, title, stair_instance in zip(axes, ("s1", "s2"), (s1, s2)):
... stair_instance.plot(ax, label=title)
... ax.set_title(title)
>>> s1.cov(s2)
0.1404958677685951
>>> s2.cov(s1)
0.1404958677685951
>>> s1.cov(s2, lower=0, upper=6)
0.125