def get_c_extract_out(r, name, sub):
 check_input = getattr(r.owner.op, 'check_input', config.check_input)
 if getattr(r.owner.op, 'check_broadcast', True):
  c_extract = r.type.c_extract_out(name, sub, check_input)
 else:
  try:
   c_extract = r.type.c_extract_out(name, sub, check_input, check_broadcast=False)
  except TypeError as e:
   c_extract = r.type.c_extract_out(name, sub, check_input)
 pre = ('\n    py_%(name)s = PyList_GET_ITEM(storage_%(name)s, 0);\n    {Py_XINCREF(py_%(name)s);}\n    ' % locals())
 return (pre + c_extract)

def get_c_extract_out ( r , name , sub ) : check_input = getattr ( r . owner . op , 'check_input' , config . check_input ) if getattr ( r . owner . op , 'check_broadcast' , True ) : c_extract = r . type . c_extract_out ( name , sub , check_input ) else : try : c_extract = r . type . c_extract_out ( name , sub , check_input , check_broadcast = False ) except TypeError as e : c_extract = r . type . c_extract_out ( name , sub , check_input ) pre = ( '\n    py_%(name)s = PyList_GET_ITEM(storage_%(name)s, 0);\n    {Py_XINCREF(py_%(name)s);}\n    ' % locals ( ) ) return ( pre + c_extract )
wrapper around c_extract_out that initializes py_name from storage .