Skip to content

Commit 47139b7

Browse files
michaelosthegetwiecki
authored andcommitted
moving to make_node implementation
this fixes the issue and theano automatically does the right broadcasting.
1 parent a53607d commit 47139b7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pymc3/distributions/dist_math.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,14 @@ class SplineWrapper(theano.Op):
317317
"""
318318

319319
__props__ = ('spline',)
320-
itypes = [tt.dscalar]
321-
otypes = [tt.dscalar]
322320

323321
def __init__(self, spline):
324322
self.spline = spline
325323

324+
def make_node(self, x):
325+
x = tt.as_tensor_variable(x)
326+
return tt.Apply(self, [x], [x.type()])
327+
326328
@property
327329
def grad_op(self):
328330
if not hasattr(self, '_grad_op'):

0 commit comments

Comments
 (0)