class_docstr: Base class for Bokeh property instances, which can be added to Bokeh
  Models.
  
  Args:
      default (obj, optional) :
          A default value for attributes created from this property to have.
  
      help (str or None, optional) :
          A documentation string for this property. It will be automatically
          used by the :ref:`bokeh.sphinxext.bokeh_prop` extension when
          generating Spinx documentation. (default: None)
class_docstr_tok: ["Base","class","for","Bokeh","property","instances",",","which","can","be","added","to","Bokeh","Models",".","Args",":","default","(","obj",",","optional",")",":","A","default","value","for","attributes","created","from","this","property","to","have",".","help","(","str","or","None",",","optional",")",":","A","documentation","string","for","this","property",".","It","will","be","automatically","used","by","the",":","ref",":","`","bokeh.sphinxext.bokeh_prop","`","extension","when","generating","Spinx","documentation",".","(","default",":","None",")"]
docstr: Whether two parameters match values.
  
  If either ``new`` or ``old`` is a NumPy array or Pandas Series or Index,
  then the result of ``np.array_equal`` will determine if the values match.
  
  Otherwise, the result of standard Python equality will be returned.
  
  Returns:
      True, if new and old match, False otherwise
docstr_tok: ["Whether","two","parameters","match","values",".","If","either","``","new","``","or","``","old","``","is","a","NumPy","array","or","Pandas","Series","or","Index",",","then","the","result","of","``","np.array_equal","``","will","determine","if","the","values","match",".","Otherwise",",","the","result","of","standard","Python","equality","will","be","returned",".","Returns",":","True",",","if","new","and","old","match",",","False","otherwise"]
code: def matches(self, new: T, old: T) -> bool:
      """Whether two parameters match values.
  
      If either ``new`` or ``old`` is a NumPy array or Pandas Series or Index,
      then the result of ``np.array_equal`` will determine if the values match.
  
      Otherwise, the result of standard Python equality will be returned.
  
      Returns:
          True, if new and old match, False otherwise
  
      """
      import numpy as np
  
      if isinstance(new, np.ndarray) or isinstance(old, np.ndarray):
          return np.array_equal(new, old)
  
      if uses_pandas(new) or uses_pandas(old):
          import pandas as pd
  
          if isinstance(new, pd.Series) or isinstance(old, pd.Series):
              return np.array_equal(new, old)
          if isinstance(new, pd.Index) or isinstance(old, pd.Index):
              return np.array_equal(new, old)
  
      try:
          # this handles the special but common case where there is a dict with array
          # or series as values (e.g. the .data property of a ColumnDataSource)
          if isinstance(new, dict) and isinstance(old, dict):
              if set(new.keys()) != set(old.keys()):
                  return False
              return all(self.matches(new[k], old[k]) for k in new)
  
          # FYI Numpy can erroneously raise a warning about elementwise
          # comparison here when a timedelta is compared to another scalar.
          # https://github.com/numpy/numpy/issues/10095
          return new == old
  
      # if the comparison fails for some reason, just punt and return no-match
      except ValueError:
          return False
  
imports: from __future__ import annotations
  import logging
  from copy import copy
  from typing import TYPE_CHECKING, Any, Callable, ClassVar, TypeVar, Union
  from ...util.dependencies import uses_pandas
  from ...util.strings import nice_join
  from ..has_props import HasProps
  from ._sphinx import property_link, register_type_link, type_link
  from .descriptor_factory import PropertyDescriptorFactory
  from .descriptors import PropertyDescriptor
  from .singletons import Intrinsic, IntrinsicType, Undefined, UndefinedType
label_desc: Use image node_id 15 for calling the Property obj's underlying member method code with example usage: obj.matches(new, old) and returns: np, unknown, np, np, all, False, False