class_docstr: Initialize weights with constant value.
  
  Parameters
  ----------
   val : float
      Constant value for weights.
class_docstr_tok: ["Initialize","weights","with","constant","value",".","Parameters","--","--","--","--","--","val",":","float","Constant","value","for","weights","."]
code: def sample(self, shape):
      return floatX(np.ones(shape) * self.val)
  
imports: import numpy
  from .utils import floatX
  from .random import get_rng
label_desc: Use image node_id 2 for calling the Constant obj's underlying member method code with example usage: obj.sample(shape) and returns: floatX