class_docstr: A Layout is an ViewableTree with ViewableElement objects as leaf
  values. Unlike ViewableTree, a Layout supports a rich display,
  displaying leaf items in a grid style layout. In addition to the
  usual ViewableTree indexing, Layout supports indexing of items by
  their row and column index in the layout.
  
  The maximum number of columns in such a layout may be controlled
  with the cols method.
class_docstr_tok: ["A","Layout","is","an","ViewableTree","with","ViewableElement","objects","as","leaf","values",".","Unlike","ViewableTree",",","a","Layout","supports","a","rich","display",",","displaying","leaf","items","in","a","grid","style","layout",".","In","addition","to","the","usual","ViewableTree","indexing",",","Layout","supports","indexing","of","items","by","their","row","and","column","index","in","the","layout",".","The","maximum","number","of","columns","in","such","a","layout","may","be","controlled","with","the","cols","method","."]
docstr: Sets the maximum number of columns in the NdLayout.
  
  Any items beyond the set number of cols will flow onto a new
  row. The number of columns control the indexing and display
  semantics of the NdLayout.
  
  Args:
      ncols (int): Number of columns to set on the NdLayout
code: def cols(self, ncols):
      """Sets the maximum number of columns in the NdLayout.
  
      Any items beyond the set number of cols will flow onto a new
      row. The number of columns control the indexing and display
      semantics of the NdLayout.
  
      Args:
          ncols (int): Number of columns to set on the NdLayout
      """
      self._max_cols = ncols
      return self
  
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 6 for calling the Layout obj's underlying member method code with example usage: obj.cols(ncols) and returns: self