Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Klaus Zimmermann
climix
Commits
58561908
Commit
58561908
authored
Apr 22, 2020
by
Klaus Zimmermann
Browse files
Add scalar mean reducer (fixes #184)
parent
a0236320
Changes
1
Hide whitespace changes
Inline
Side-by-side
climix/index_functions/support.py
View file @
58561908
...
...
@@ -22,6 +22,11 @@ SUPPORTED_REDUCERS = [
'mean'
,
]
def
scalar_mean
(
*
args
):
return
float
(
np
.
mean
(
args
))
SCALAR_OPERATORS
=
{
'<'
:
operator
.
lt
,
'>'
:
operator
.
gt
,
...
...
@@ -32,6 +37,7 @@ SCALAR_REDUCERS = {
'min'
:
min
,
'max'
:
max
,
'sum'
:
sum
,
'mean'
:
scalar_mean
,
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment