From 9a6ec1fa8fe4cf9a989e6cd477979a3875c36d66 Mon Sep 17 00:00:00 2001 From: Mauko Quiroga Date: Tue, 31 Aug 2021 12:38:49 +0200 Subject: [PATCH] Improve misc doc --- openfisca_core/commons/rates.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openfisca_core/commons/rates.py b/openfisca_core/commons/rates.py index 229f224140..618689f081 100644 --- a/openfisca_core/commons/rates.py +++ b/openfisca_core/commons/rates.py @@ -2,10 +2,10 @@ import numpy -from . import ArrayLike +from .typing import ArrayLike, NDArray -def average_rate(target: numpy.ndarray, varying: ArrayLike[float], trim: Optional[ArrayLike[float]] = None) -> numpy.ndarray: +def average_rate(target: NDArray[float], varying: ArrayLike[float], trim: Optional[ArrayLike[float]] = None) -> NDArray[float]: """Computes the average rate of a target net income. Given a ``target`` net income, and according to the ``varying`` gross @@ -40,7 +40,7 @@ def average_rate(target: numpy.ndarray, varying: ArrayLike[float], trim: Optiona return average_rate -def marginal_rate(target: numpy.ndarray, varying: numpy.ndarray, trim: Optional[ArrayLike[float]] = None) -> numpy.ndarray: +def marginal_rate(target: NDArray[float], varying: NDArray[float], trim: Optional[ArrayLike[float]] = None) -> NDArray[float]: """Computes the marginal rate of a target net income. Given a ``target`` net income, and according to the ``varying`` gross