Skip to content

Commit

Permalink
remove unused api (pymc-devs#133)
Browse files Browse the repository at this point in the history
* remove unused api

* black
  • Loading branch information
ferrine authored Aug 20, 2019
1 parent 579357c commit 9367133
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 109 deletions.
108 changes: 0 additions & 108 deletions pymc4/coroutine_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,111 +191,3 @@ def __init__(self, genfn, *, name=None, keep_auxiliary=True, keep_return=True):

def control_flow(self):
return (yield from self.genfn())

def __iter__(self):
return self.control_flow()

# This will result into unnamed (outer) name scope and not tracked return value
@yieldify
def __add__(self, other):
return self + other

@yieldify
def __radd__(self, other):
return other + self

@yieldify
def __sub__(self, other):
return self - other

@yieldify
def __rsub__(self, other):
return other - self

@yieldify
def __mul__(self, other):
return self * other

@yieldify
def __rmul__(self, other):
return other * self

@yieldify
def __matmul__(self, other):
return self @ other

@yieldify
def __rmatmul__(self, other):
return other @ self

@yieldify
def __truediv__(self, other):
return self / other

@yieldify
def __rtruediv__(self, other):
return other / self

@yieldify
def __floordiv__(self, other):
return self // other

@yieldify
def __rfloordiv__(self, other):
return other // self

@yieldify
def __mod__(self, other):
return self % other

@yieldify
def __rmod__(self, other):
return other % self

@yieldify
def __pow__(self, other):
return self ** other

@yieldify
def __rpow__(self, other):
return other ** self

@yieldify
def __and__(self, other):
return self & other

@yieldify
def __rand__(self, other):
return other & self

@yieldify
def __xor__(self, other):
return self ^ other

@yieldify
def __rxor__(self, other):
return other ^ self

@yieldify
def __or__(self, other):
return self | other

@yieldify
def __ror__(self, other):
return other | self

@yieldify
def __neg__(self):
return -self

@yieldify
def __pos__(self):
return +self

@yieldify
def __invert__(self):
return ~self

@yieldify
def __getitem__(self, slice_spec, var=None):
return self.__getitem__(slice_spec, var=var)
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import tensorflow as tf


@pytest.fixture(scope="function")
@pytest.fixture(scope="function", autouse=True)
def tf_seed():
tf.random.set_seed(37208) # random.org
yield

0 comments on commit 9367133

Please sign in to comment.