parameters: (dims, strides, itemsize)
return_statement: return True
docstring: Is the given shape, strides, and itemsize of C layout?
  
      Note: The code is usable as a numba-compiled function
docstring_summary: Is the given shape, strides, and itemsize of C layout?
docstring_tokens: Is the given shape strides and itemsize of C layout?
function: def is_contiguous(dims, strides, itemsize):
      """Is the given shape, strides, and itemsize of C layout?
  
      Note: The code is usable as a numba-compiled function
      """
      nd = len(dims)
      # Check and skip 1s or 0s in inner dims
      innerax = nd - 1
      while innerax > -1 and dims[innerax] <= 1:
          innerax -= 1
  
      # Early exit if all axis are 1s or 0s
      if innerax < 0:
          return True
  
      # Check itemsize matches innermost stride
      if itemsize != strides[innerax]:
          return False
  
      # Check and skip 1s or 0s in outer dims
      outerax = 0
      while outerax < innerax and dims[outerax] <= 1:
          outerax += 1
  
      # Check remaining strides to be contiguous
      ax = innerax
      while ax > outerax:
          if strides[ax] * dims[ax] != strides[ax - 1]:
              return False
          ax -= 1
      return True
function_tokens: def is_contiguous ( dims , strides , itemsize ) : nd = len ( dims ) # Check and skip 1s or 0s in inner dims innerax = nd - 1 while innerax > - 1 and dims [ innerax ] <= 1 : innerax -= 1 # Early exit if all axis are 1s or 0s if innerax < 0 : return True # Check itemsize matches innermost stride if itemsize != strides [ innerax ] : return False # Check and skip 1s or 0s in outer dims outerax = 0 while outerax < innerax and dims [ outerax ] <= 1 : outerax += 1 # Check remaining strides to be contiguous ax = innerax while ax > outerax : if strides [ ax ] * dims [ ax ] != strides [ ax - 1 ] : return False ax -= 1 return True