parameters: (filename, num_images)
return_statement: return labels
docstring: Extract the labels into a vector of int64 label IDs.
docstring_summary: Extract the labels into a vector of int64 label IDs.
docstring_tokens: Extract the labels into a vector of int64 label IDs .
function: def extract_labels(filename, num_images):
    """Extract the labels into a vector of int64 label IDs."""
    print('Extracting', filename)
    with gzip.open(filename) as bytestream:
      bytestream.read(8)
      buf = bytestream.read(1 * num_images)
      labels = numpy.frombuffer(buf, dtype=numpy.uint8).astype(numpy.int64)
    return labels
function_tokens: def extract_labels ( filename , num_images ) : print ( 'Extracting' , filename ) with gzip . open ( filename ) as bytestream : bytestream . read ( 8 ) buf = bytestream . read ( 1 * num_images ) labels = numpy . frombuffer ( buf , dtype = numpy . uint8 ) . astype ( numpy . int64 ) return labels