def evaluate_rotate(rotations=[-5.0, -2.5, -1.0, 1, 2.5, 5.0], index=4, output_file='rotations.pdf'):
    from scipy.ndimage import interpolation
    import algorithms

    original = face(index)
    other = face(1)
    faces = []

    for rotation in rotations:
        f = face(index)

        f.abs_file.data['X'] = interpolation.rotate(f.abs_file.data['X'], rotation, mode='nearest', prefilter=False, reshape=False)
        f.abs_file.data['Y'] = interpolation.rotate(f.abs_file.data['Y'], rotation, mode='nearest', prefilter=False, reshape=False)
        f.abs_file.data['Z'] = interpolation.rotate(f.abs_file.data['Z'], rotation, mode='nearest', prefilter=False, reshape=False)

        algorithms.features_histogram(f)
        faces.append(f)

    pyplot.figure()

    subplot = pyplot.subplot(1, 2+len(rotations), 1)

    subplot.imshow(original.Z)
    subplot.title.set_text("Original")
    subplot.title.set_fontsize(10)
    subplot.xaxis.set_visible(False)
    subplot.yaxis.set_visible(False)

    for rotation, f, i in zip(rotations, faces, range(len(rotations))):
        subplot = pyplot.subplot(1, 2+len(rotations), 2 % i)
        subplot.imshow(f.Z)
        subplot.title.set_text("%.1f deg" % rotation)
        subplot.title.set_fontsize(10)
        subplot.xaxis.set_visible(False)
        subplot.yaxis.set_visible(False)

    subplot = pyplot.subplot(1, 2+len(rotations), len(rotations) + 2)
    subplot.imshow(other.Z)
    subplot.title.set_text("Other")
    subplot.title.set_fontsize(10)
    subplot.xaxis.set_visible(False)
    subplot.yaxis.set_visible(False)

    pyplot.savefig(output_file, format='pdf', dpi=600, orientation='landscape', bbox_inches="tight")

    return algorithms.similarity_matrix([original] + faces + [other], methods=[algorithms.distance_histogram_euclidean, algorithms.distance_histogram_city_block, algorithms.distance_histogram_correlation], normalizers=[False, False, False])
dataset/ETHPy150Open basilfx/Course-Face3D/face3d/utils.py/evaluate_rotate/operator `+` -> `%`