calc_eigen was referenced before assignment

Signed-off-by: Zarrar Shehzad <czarrar@gmail.com>