diff --git a/openfisca_paris/paris.py b/openfisca_paris/paris.py index 447085a..d8f9bb5 100644 --- a/openfisca_paris/paris.py +++ b/openfisca_paris/paris.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import division -from numpy import (maximum as max_, logical_not as not_, absolute as abs_, minimum as min_, select, where) +from numpy import (full_like as fl_, inf, divide as div_, maximum as max_, where) from openfisca_france.model.base import * # noqa analysis:ignore @@ -226,8 +226,15 @@ def formula(famille, period, legislation): aspa_reference = famille('paris_aspa_reference', period) ressources = max_(aspa_reference, base_ressources) - return (loyer + charges_forfaitaires_logement - aide_logement) / ressources + # Utiliser si les ressources sont à 0 + ressources_inf = fl_(ressources, inf) + return div_( + (loyer + charges_forfaitaires_logement - aide_logement), + ressources, + out=ressources_inf, + where=ressources != 0 + ) class paris_condition_taux_effort(Variable): value_type = bool diff --git a/setup.py b/setup.py index f1ca1ce..746c0da 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="Openfisca-Paris", - version="5.5.5", + version="5.5.6", author="OpenFisca Team", author_email="contact@openfisca.fr", classifiers=[