class_docstr: NdLayout is a UniformNdMapping providing an n-dimensional
  data structure to display the contained Elements and containers
  in a layout. Using the cols method the NdLayout can be rearranged
  with the desired number of columns.
class_docstr_tok: ["NdLayout","is","a","UniformNdMapping","providing","an","n-dimensional","data","structure","to","display","the","contained","Elements","and","containers","in","a","layout",".","Using","the","cols","method","the","NdLayout","can","be","rearranged","with","the","desired","number","of","columns","."]
docstr: Compute a dict of {(row,column): (key, value)} elements from the
  current set of items and specified number of columns.
code: def grid_items(self):
      """
      Compute a dict of {(row,column): (key, value)} elements from the
      current set of items and specified number of columns.
      """
      if list(self.keys()) == []:
          return {}
      cols = self._max_cols
      return {
          (idx // cols, idx % cols): (key, item)
          for idx, (key, item) in enumerate(self.data.items())
      }
  
imports: import numpy
  import param
  from .None import traversal
  from .dimension import Dimension, Dimensioned, ViewableElement, ViewableTree
  from .ndmapping import NdMapping, UniformNdMapping
label_desc: Use image node_id 4 for calling the NdLayout obj's underlying member method code with example usage: obj.grid_items() and returns: unknown, dict