Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
311b563c
Unverified
Commit
311b563c
authored
Dec 07, 2020
by
Kyle Brandt
Committed by
GitHub
Dec 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expr: make reduction nan/null more consistent (#29665)
parent
da32cef4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
pkg/expr/mathexp/reduce.go
+3
-3
No files found.
pkg/expr/mathexp/reduce.go
View file @
311b563c
...
...
@@ -11,7 +11,7 @@ func Sum(v *data.Field) *float64 {
var
sum
float64
for
i
:=
0
;
i
<
v
.
Len
();
i
++
{
if
f
,
ok
:=
v
.
At
(
i
)
.
(
*
float64
);
ok
{
if
f
==
nil
{
if
f
==
nil
||
math
.
IsNaN
(
*
f
)
{
nan
:=
math
.
NaN
()
return
&
nan
}
...
...
@@ -35,7 +35,7 @@ func Min(fv *data.Field) *float64 {
}
for
i
:=
0
;
i
<
fv
.
Len
();
i
++
{
if
v
,
ok
:=
fv
.
At
(
i
)
.
(
*
float64
);
ok
{
if
v
==
nil
{
if
v
==
nil
||
math
.
IsNaN
(
*
v
)
{
nan
:=
math
.
NaN
()
return
&
nan
}
...
...
@@ -55,7 +55,7 @@ func Max(fv *data.Field) *float64 {
}
for
i
:=
0
;
i
<
fv
.
Len
();
i
++
{
if
v
,
ok
:=
fv
.
At
(
i
)
.
(
*
float64
);
ok
{
if
v
==
nil
{
if
v
==
nil
||
math
.
IsNaN
(
*
v
)
{
nan
:=
math
.
NaN
()
return
&
nan
}
...
...
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