def _float_ones_like(x):
 dtype = x.type.dtype
 if (dtype not in tensor.float_dtypes):
  dtype = theano.config.floatX
 return tensor.ones_like(x, dtype=dtype)

def _float_ones_like ( x ) : dtype = x . type . dtype if ( dtype not in tensor . float_dtypes ) : dtype = theano . config . floatX return tensor . ones_like ( x , dtype = dtype )
like ones_like .