BoundaryCondition should return a python fraction only when necessary