[issue39274] Conversion from fractions.Fraction to bool

2020-01-09 Thread François Durand
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

[issue39274] Conversion from fractions.Fraction to bool

2020-01-09 Thread François Durand
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