> For the complete documentation index, see [llms.txt](https://water-strategy.gitbook.io/waterstrategy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://water-strategy.gitbook.io/waterstrategy/francais/bases-de-la-modelisation/recorders/base-recorder/aggregator.md).

# Agrégateur

## Description générale

Classe utilitaire pour le calcul de valeurs agrégées.

Il est peu probable que les utilisateurs utilisent cette classe directement. À la place *Enregistreur* les sous-classes utiliseront cette fonctionnalité pour agréger leurs résultats selon différentes dimensions (par exemple, le temps, les scénarios, etc.). [API Référence](https://pywr.github.io/pywr-docs/master/api/generated/pywr.recorders.Aggregator.html)

## Attributs

. \_kwargs

<table><thead><tr><th width="158">Nom</th><th width="473">Descriptif</th><th>Nécessaire</th><th></th></tr></thead><tbody><tr><td>func</td><td><p>Fonction d'agrégation à utiliser. Il peut s'agir d'une chaîne ou d'un dict définissant des fonctions d'agrégation, ou d'une fonction personnalisée appelable qui effectue l'agrégation.</p><p>Lorsqu'il s'agit d'une chaîne, elle peut être l'une des suivantes : « sum », « min », « max », « mean », « median », « product » ou « count »_non nul ». Ces chaînes correspondent aux fonctions <em>numpy</em> correspondantes et obligent l'agrégateur à les utiliser</p><p>.</p><p>Un dict peut être fourni contenant une touche « func » et des touches facultatives « args » et « kwargs ». La valeur de « func » doit être une chaîne correspondant aux noms des fonctions numpy susmentionnés avec les options supplémentaires « percentile » et « percentileofscore ». Ces deux dernières fonctions nécessitent des arguments supplémentaires (le percentile et le score) pour fonctionner et doivent être fournies sous forme de valeurs dans les clés « args » ou « kwargs » du dictionnaire. Reportez-vous aux définitions de fonctions numpy (ou scipy) correspondantes pour obtenir de la documentation sur ces arguments</p><p>.</p><p>Enfin, une fonction appelable peut être donnée. Cette fonction doit accepter un tableau numpy 1D ou 2D comme premier argument et prendre en charge le mot clé « axis » en tant que valeur entière qui détermine l'axe sur lequel la fonction doit appliquer l'agrégation. Le mot clé axis n'est fourni que lorsqu'un tableau 2D est fourni. Par conséquent, `la fonction appelable doit se comporter de la même manière que les fonctions numpy</p></td><td></td><td></td></tr><tr><td>Oui</td><td></td><td></td><td></td></tr><tr><td>func_args</td><td>func_</td><td></td><td></td></tr><tr><td>args : list</td><td>Oui func</td><td>func_kwargs : dict</td><td>Oui</td></tr></tbody></table>

## Exemple

\`\`json { Agrégateur (« somme ») Agrégateur ({"func » : « percentile », « args » : \[95], « kwargs » : {}}) Agrégateur ({"func » : « percentileofscore », « kwargs » : {"score » : 0.5, « kind » : « rank"}}) }

```
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://water-strategy.gitbook.io/waterstrategy/francais/bases-de-la-modelisation/recorders/base-recorder/aggregator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
