def _get_cython_type_upcast(dtype):
 if is_integer_dtype(dtype):
  return 'int64_t'
 elif is_float_dtype(dtype):
  return 'double'
 else:
  return 'object'

def _get_cython_type_upcast ( dtype ) : if is_integer_dtype ( dtype ) : return 'int64_t' elif is_float_dtype ( dtype ) : return 'double' else : return 'object'
upcast a dtype to int64_t .