François Durand added the comment:
As of now, fractions.Fraction.__bool__ is implemented as: ``return a._numerator
!= 0``. However, this does not necessary return a bool (which would be
desired). In particular, when the numerator is a numpy integer, this returns a
numpy bool instead. Another
New submission from François Durand :
As of now, fractions.Fraction.__bool__ is implemented as: ``return a._numerator
!= 0``. However, this does not necessary return a bool (which would be
desired). In particular, when the numerator is a numpy integer, this returns a
numpy bool instead