class_docstr: __init__(self, value=None, shape=None, dtype=np.float32, device=None, name='')
  
  A constant value. It can be a scalar, vector, matrix, or tensor
  of floating point numbers that cannot be modified.
  
  A Constant is a :class:`~cntk.variables.Variable` and therefore inherits all its methods.
  
  Example:
       >>> c = C.Constant(1, (2,3))
       >>> c.value
           array([[1., 1., 1.],
                  [1., 1., 1.]], dtype=float32)
  
  Args:
     value (`np.ndarray` or `list` or `float` or `int`): Initial value.
     dtype (`np.float32` or `np.float64` or `np.float16`): data type to store the values as.
     device (:class:`~cntk.device.DeviceDescriptor`): the device on which the values should reside.
     name (`str`): an optional name for this constant.
  Todo:
     Document initializers for `value` parameter.
class_docstr_tok: ["__init__","(","self",",","value=None",",","shape=None",",","dtype=np.float32",",","device=None",",","name=","''",")","A","constant","value",".","It","can","be","a","scalar",",","vector",",","matrix",",","or","tensor","of","floating","point","numbers","that","can","not","be","modified",".","A","Constant","is","a",":","class",":","`","~cntk.variables.Variable","`","and","therefore","inherits","all","its","methods",".","Example",":",">",">",">","c","=","C.Constant","(","1",",","(","2,3",")",")",">",">",">","c.value","array","(","[","[","1.",",","1.",",","1",".","]",",","[","1.",",","1.",",","1",".","]","]",",","dtype=float32",")","Args",":","value","(","`","np.ndarray","`","or","`","list","`","or","`","float","`","or","`","int","`",")",":","Initial","value",".","dtype","(","`","np.float32","`","or","`","np.float64","`","or","`","np.float16","`",")",":","data","type","to","store","the","values","as",".","device","(",":","class",":","`","~cntk.device.DeviceDescriptor","`",")",":","the","device","on","which","the","values","should","reside",".","name","(","`","str","`",")",":","an","optional","name","for","this","constant",".","Todo",":","Document","initializers","for","`","value","`","parameter","."]
code: def value(self, val):
      if isinstance(val, np.ndarray):
          ndarray = NDArrayView.from_dense(val.astype(self.dtype))
          super(Constant, self).set_value(ndarray)
      elif isinstance(val, cntk_py.NDArrayView):
          super(Constant, self).set_value(val)
      else:
          raise TypeError("Unsupported value type: %s", type(val))
  
imports: import numpy
  from .None import cntk_py
  from .core import NDArrayView
  from .device import DeviceDescriptor, use_default_device
  from .tensor import TensorOpsMixin
  from .default_options import get_default_override, default_override_or
  from .internal import typemap, sanitize_precision, sanitize_value, sanitize_shape, sanitize_dtype_cntk, sanitize_dynamic_axes
label_desc: Use image node_id 3 for calling the Constant obj's underlying member method code with example usage: obj.value(val) without return types