summaryrefslogtreecommitdiff
path: root/distribution.py
diff options
context:
space:
mode:
authorSupremist <sergkarv@gmail.com>2026-03-12 00:15:04 +0200
committerSupremist <sergkarv@gmail.com>2026-03-12 00:15:04 +0200
commitc2f046b9a5315edbf0c436d970cfa42b27ef5dd6 (patch)
tree6f78b456cfd5c0fad3f25f1526b7c59f12ae3449 /distribution.py
parent6cdeabcfc131a2b21599b3fa5980a4ecb59539bd (diff)
downloadpf2e_calc-c2f046b9a5315edbf0c436d970cfa42b27ef5dd6.tar.xz
pf2e_calc-c2f046b9a5315edbf0c436d970cfa42b27ef5dd6.zip
Check Twin Takedown vs Double slice
Diffstat (limited to 'distribution.py')
-rw-r--r--distribution.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/distribution.py b/distribution.py
index d2503fa..47313b8 100644
--- a/distribution.py
+++ b/distribution.py
@@ -82,7 +82,7 @@ class Distribution:
ax.bar(xax, yax)
ax.set_ylabel(ylb)
ax.set_xlabel(xlb)
- ax.xaxis.set_major_locator(ticker.FixedLocator(xax))
+ # ax.xaxis.set_major_locator(ticker.FixedLocator(xax))
# ax.yaxis.set_major_locator(ticker.FixedLocator(list(set(yax))))
plt.grid(True)
plt.show()
@@ -111,9 +111,15 @@ class Distribution:
res.insert(operator(lv, rv, *args, **kwargs), lprob*rprob)
return res
+ def __iadd__(self, other):
+ self = self.apply2(lambda x, y: x + y, other)
+ return self
+
def __add__(self, other):
return self.apply2(lambda x, y: x + y, other)
+ __radd__ = __add__
+
def __neg__(self):
return self.apply(lambda x: -x)