def _scal_inplace(symbol):
 symbolname = symbol.__name__
 inplace = symbolname.endswith('_inplace')
 if inplace:
  scalar_op = getattr(scal, symbolname[:(- len('_inplace'))])
  inplace_scalar_op = scalar_op.__class__(scal.transfer_type(0))
  rval = elemwise.Elemwise(inplace_scalar_op, {0: 0}, name=symbolname)
 else:
  scalar_op = getattr(scal, symbolname)
  rval = elemwise.Elemwise(scalar_op, name=symbolname)
 if getattr(symbol, '__doc__', False):
  rval.__doc__ = ((symbol.__doc__ + '\n') + rval.__doc__)
 rval.__epydoc_asRoutine = symbol
 rval.__module__ = 'theano.tensor.inplace'
 pprint.assign(rval, printing.FunctionPrinter(symbolname.replace('_inplace', '=')))
 return rval

def _scal_inplace ( symbol ) : symbolname = symbol . __name__ inplace = symbolname . endswith ( '_inplace' ) if inplace : scalar_op = getattr ( scal , symbolname [ : ( - len ( '_inplace' ) ) ] ) inplace_scalar_op = scalar_op . __class__ ( scal . transfer_type ( 0 ) ) rval = elemwise . Elemwise ( inplace_scalar_op , { 0 : 0 } , name = symbolname ) else : scalar_op = getattr ( scal , symbolname ) rval = elemwise . Elemwise ( scalar_op , name = symbolname ) if getattr ( symbol , '__doc__' , False ) : rval . __doc__ = ( ( symbol . __doc__ + '\n' ) + rval . __doc__ ) rval . __epydoc_asRoutine = symbol rval . __module__ = 'theano.tensor.inplace' pprint . assign ( rval , printing . FunctionPrinter ( symbolname . replace ( '_inplace' , '=' ) ) ) return rval
replace a symbol definition with an elementwise version of the corresponding scalar op .