parameters: (labels, preds, shape=0)
docstring: Check to see if the two arrays are the same size.
docstring_summary: Check to see if the two arrays are the same size.
docstring_tokens: Check to see if the two arrays are the same size .
function: def check_label_shapes(labels, preds, shape=0):
      """Check to see if the two arrays are the same size."""
  
      if shape == 0:
          label_shape, pred_shape = len(labels), len(preds)
      else:
          label_shape, pred_shape = labels.shape, preds.shape
  
      if label_shape != pred_shape:
          raise ValueError("Shape of labels {} does not match shape of "
                           "predictions {}".format(label_shape, pred_shape))
function_tokens: def check_label_shapes ( labels , preds , shape = 0 ) : if shape == 0 : label_shape , pred_shape = len ( labels ) , len ( preds ) else : label_shape , pred_shape = labels . shape , preds . shape if label_shape != pred_shape : raise ValueError ( "Shape of labels {} does not match shape of " "predictions {}" . format ( label_shape , pred_shape ) )