def logpow(x, m):
 return tt.switch(tt.eq(x, 0), (- np.inf), (m * tt.log(x)))

def logpow ( x , m ) : return tt . switch ( tt . eq ( x , 0 ) , ( - np . inf ) , ( m * tt . log ( x ) ) )
calculates log since m*log(x) will fail when m .