code: def categorize_array(array, dim):
      
      return np.array([dim.pprint_value(x) for x in array])
docs: Uses a Dimension instance to convert an array of values to categorical
      (i.e. string) values and applies escaping for colons, which bokeh
      treats as a categorical suffix.