class_docstr: Abstract class for calculating a set of features for a datapoint.
  
  This class is abstract and cannot be invoked directly. You'll
  likely only interact with this class if you're a developer. In
  that case, you might want to make a child class which
  implements the `_featurize` method for calculating features for
  a single datapoints if you'd like to make a featurizer for a
  new datatype.
class_docstr_tok: ["Abstract","class","for","calculating","a","set","of","features","for","a","datapoint",".","This","class","is","abstract","and","can","not","be","invoked","directly",".","You'll","likely","only","interact","with","this","class","if","you","'re","a","developer",".","In","that","case",",","you","might","want","to","make","a","child","class","which","implements","the","`","_featurize","`","method","for","calculating","features","for","a","single","datapoints","if","you","'d","like","to","make","a","featurizer","for","a","new","datatype","."]
docstr: Calculate features for datapoints.
  
  Parameters
  ----------
  datapoints: Iterable[Any]
      A sequence of objects that you'd like to featurize. Subclassses of
      `Featurizer` should instantiate the `_featurize` method that featurizes
      objects in the sequence.
  log_every_n: int, default 1000
      Logs featurization progress every `log_every_n` steps.
  
  Returns
  -------
  np.ndarray
      A numpy array containing a featurized representation of `datapoints`.
docstr_tok: ["Calculate","features","for","datapoints",".","Parameters","--","--","--","--","--","datapoints",":","Iterable","[","Any","]","A","sequence","of","objects","that","you","'d","like","to","featurize",".","Subclassses","of","`","Featurizer","`","should","instantiate","the","`","_featurize","`","method","that","featurizes","objects","in","the","sequence",".","log_every_n",":","int",",","default","1000","Logs","featurization","progress","every","`","log_every_n","`","steps",".","Returns","--","--","--","-","np.ndarray","A","numpy","array","containing","a","featurized","representation","of","`","datapoints","`","."]
code: def featurize(
      self, datapoints: Iterable[Any], log_every_n: int = 1000, **kwargs
  ) -> np.ndarray:
      """Calculate features for datapoints.
  
      Parameters
      ----------
      datapoints: Iterable[Any]
          A sequence of objects that you'd like to featurize. Subclassses of
          `Featurizer` should instantiate the `_featurize` method that featurizes
          objects in the sequence.
      log_every_n: int, default 1000
          Logs featurization progress every `log_every_n` steps.
  
      Returns
      -------
      np.ndarray
          A numpy array containing a featurized representation of `datapoints`.
      """
      datapoints = list(datapoints)
      features = []
      for i, point in enumerate(datapoints):
          if i % log_every_n == 0:
              logger.info("Featurizing datapoint %i" % i)
          try:
              features.append(self._featurize(point, **kwargs))
          except:
              logger.warning(
                  "Failed to featurize datapoint %d. Appending empty array"
              )
              features.append(np.array([]))
  
      return np.asarray(features)
  
imports: import inspect
  import logging
  import numpy
  from typing import Any, Dict, Iterable, Optional, Tuple, Union, cast
  from deepchem.utils import get_print_threshold
  from deepchem.utils.typing import PymatgenStructure
label_desc: Use image node_id 1 for calling the Featurizer obj's underlying member method code with example usage: obj.featurize(datapoints, log_every_n) and returns: np