Backport 1.8 3978

Backport #3978: ` BUG: fix broken UPLO of eigh in python3`.