class_docstr: Select candidates for recommendation for a user, possibly with some
  additional ratings.
  
  :class:`.UnratedItemCandidateSelector` is the default and most common implementation
  of this interface.
class_docstr_tok: ["Select","candidates","for","recommendation","for","a","user",",","possibly","with","some","additional","ratings",".",":","class",":","`",".UnratedItemCandidateSelector","`","is","the","default","and","most","common","implementation","of","this","interface","."]
docstr: Utility function for converting a series or array into an array of item
  IDs.  Useful in implementations of :py:meth:`candidates`.
docstr_tok: ["Utility","function","for","converting","a","series","or","array","into","an","array","of","item","IDs",".","Useful","in","implementations","of",":","py",":","meth",":","`","candidates","`","."]
code: def rated_items(ratings):
      """
      Utility function for converting a series or array into an array of item
      IDs.  Useful in implementations of :py:meth:`candidates`.
      """
      import pandas as pd
      import numpy as np
  
      if isinstance(ratings, pd.Series):
          return ratings.index.values
      elif isinstance(ratings, np.ndarray):
          return ratings
      else:
          return np.array(ratings)
  
file_path: lkpy/lenskit/algorithms/__init__.py
imports: from abc import ABCMeta, abstractmethod
  import inspect
label_desc: Use image node_id 2 for calling the CandidateSelector obj's underlying member method code with example usage: obj.rated_items(ratings) and returns: ratings, ratings, np