docstr: Tests if dimension is scalar in each subpath.
docstr_tok: ["Tests","if","dimension","is","scalar","in","each","subpath","."]
code: def isscalar(cls, dataset, dim, per_geom=False):
      """
      Tests if dimension is scalar in each subpath.
      """
      dim = dataset.get_dimension(dim)
      geom_dims = cls.geom_dims(dataset)
      if dim in geom_dims:
          return False
      elif per_geom:
          return all(
              isscalar(v) or len(list(unique_array(v))) == 1
              for v in dataset.data[dim.name]
          )
      dim = dataset.get_dimension(dim)
      return len(dataset.data[dim.name].unique()) == 1
  
imports: import sys
  import warnings
  from collections import defaultdict
  import numpy
  import pandas
  from holoviews.core.util import isscalar, unique_iterator, unique_array
  from holoviews.core.data import Dataset, Interface, MultiInterface, PandasAPI
  from holoviews.core.data.interface import DataError
  from holoviews.core.data import PandasInterface
  from holoviews.core.data.spatialpandas import get_value_array
  from holoviews.core.dimension import dimension_name
  from holoviews.element import Path
  from ..util import asarray, geom_to_array, geom_types, geom_length
  from .geom_dict import geom_from_dict
label_desc: Use image node_id 14 for calling the GeoPandasInterface obj's underlying member method code with example usage: obj.isscalar(cls, dataset, dim, per_geom) and returns: unknown, False, all