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: 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 5 for calling the NdLayout obj's underlying member method code with example usage: obj.cols(ncols) and returns: self