def grid_to_graph(n_x, n_y, n_z=1, mask=None, return_as=sparse.coo_matrix, dtype=np.int):
 return _to_graph(n_x, n_y, n_z, mask=mask, return_as=return_as, dtype=dtype)

def grid_to_graph ( n_x , n_y , n_z = 1 , mask = None , return_as = sparse . coo_matrix , dtype = np . int ) : return _to_graph ( n_x , n_y , n_z , mask = mask , return_as = return_as , dtype = dtype )
graph of the pixel-to-pixel connections edges exist if 2 voxels are connected .