parameters: (datum)
docstring: Converts a datum to an array. Note that the label is not returned,
      as one can easily get it by calling datum.label.
docstring_summary: Converts a datum to an array. Note that the label is not returned,
      as one can easily get it by calling datum.label.
docstring_tokens: Converts a datum to an array . Note that the label is not returned as one can easily get it by calling datum . label .
function: def datum_to_array(datum):
      """Converts a datum to an array. Note that the label is not returned,
      as one can easily get it by calling datum.label.
      """
      if len(datum.data):
          return np.fromstring(datum.data, dtype=np.uint8).reshape(
              datum.channels, datum.height, datum.width)
      else:
          return np.array(datum.float_data).astype(float).reshape(
              datum.channels, datum.height, datum.width)
function_tokens: def datum_to_array ( datum ) : if len ( datum . data ) : return np . fromstring ( datum . data , dtype = np . uint8 ) . reshape ( datum . channels , datum . height , datum . width ) else : return np . array ( datum . float_data ) . astype ( float ) . reshape ( datum . channels , datum . height , datum . width )