parameters: (self)
docstring: Returns the rank of this shape, or None if it is unspecified.
docstring_summary: Returns the rank of this shape, or None if it is unspecified.
docstring_tokens: Returns the rank of this shape or None if it is unspecified .
function: def ndims(self):
      """Returns the rank of this shape, or None if it is unspecified."""
      if self._dims is None:
        return None
      else:
        return len(self._dims)
function_tokens: def ndims ( self ) : if self . _dims is None : return None else : return len ( self . _dims )