From 3d926a7b30c5e2d7599ca48f6566bcaf4d8b4d9d Mon Sep 17 00:00:00 2001 From: LouisePaulDelvaux Date: Tue, 1 Jul 2014 18:27:34 +0200 Subject: [PATCH] Cleaning --- Regimes/Regimes_complementaires_prive.py | 2 +- regime.py | 2 +- sandbox/compare/print_details.py | 1 - trimesters_functions.py | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Regimes/Regimes_complementaires_prive.py b/Regimes/Regimes_complementaires_prive.py index 6ff19cc..828d96a 100644 --- a/Regimes/Regimes_complementaires_prive.py +++ b/Regimes/Regimes_complementaires_prive.py @@ -4,7 +4,7 @@ parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) os.sys.path.insert(0,parentdir) -from numpy import minimum, maximum, multiply +from numpy import minimum from regime import RegimeComplementaires, compare_destinie diff --git a/regime.py b/regime.py index f919073..73fb6aa 100644 --- a/regime.py +++ b/regime.py @@ -209,7 +209,7 @@ def nombre_points(self, data, trim_wages): Pour calculer ces points, il faut diviser la cotisation annuelle ouvrant des droits par le salaire de référence de l'année concernée et multiplier par le taux d'acquisition des points''' sali_plaf = self.sali_for_regime(data, trim_wages) - Plong_regime = getattr(self.P_longit.prive.complementaire, self.name) + Plong_regime = reduce(getattr, self.param_name.split('.'), self.P_longit) #getattr(self.P_longit.prive.complementaire, self.name) salref = Plong_regime.sal_ref taux_cot = Plong_regime.taux_cot_moy assert len(salref) == sali_plaf.shape[1] == len(taux_cot) diff --git a/sandbox/compare/print_details.py b/sandbox/compare/print_details.py index 5fd36ff..5e0e698 100644 --- a/sandbox/compare/print_details.py +++ b/sandbox/compare/print_details.py @@ -2,7 +2,6 @@ from simulation import PensionSimulation from pension_legislation import PensionParam, PensionLegislation -from print_decorator import data_to_print, yearsim def run_to_print(data, yearsim): param = PensionParam(yearsim, data) diff --git a/trimesters_functions.py b/trimesters_functions.py index 93bb117..a80593c 100644 --- a/trimesters_functions.py +++ b/trimesters_functions.py @@ -5,7 +5,7 @@ @author: aeidelman ''' -from numpy import minimum, array, nonzero, divide, transpose, zeros, isnan, around, multiply, greater, where +from numpy import minimum, array, divide, zeros, isnan, multiply, greater from pandas import Series from regime import compare_destinie from time_array import TimeArray