def get_scalar_type(dtype):
 if (dtype not in get_scalar_type.cache):
  get_scalar_type.cache[dtype] = Scalar(dtype=dtype)
 return get_scalar_type.cache[dtype]

def get_scalar_type ( dtype ) : if ( dtype not in get_scalar_type . cache ) : get_scalar_type . cache [ dtype ] = Scalar ( dtype = dtype ) return get_scalar_type . cache [ dtype ]
return a scalar object .