Coverage for kwant/graph/slicer.pyx : 88%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# # This file is part of Kwant. It is subject to the license terms in the file # LICENSE.rst found in the top-level directory of this distribution and at # http://kwant-project.org/license. A list of Kwant authors can be found in # the file AUTHORS.rst at the top-level directory of this distribution and at # http://kwant-project.org/authors.
cimport numpy as np cimport cython from libc.string cimport memcpy from .defs cimport gint from .core cimport CGraph
from . cimport c_slicer
@cython.boundscheck(False) """ TODO: write me. """ cdef np.ndarray[gint, ndim=1] leftarr, rightarr, slc cdef c_slicer.Slicing *slicing cdef int i, slc_size
raise ValueError("Left cannot be interpreted as a 1D array.")
raise ValueError("Right cannot be interpreted as a 1D array.")
raise ValueError("Empty boundary arrays are not supported yet.")
# slicing only possible if there is no overlap between # left and right slices
graph.heads_idxs, graph.heads, sizeof(gint) * slc_size) |