Function kurtosis in DolphinDB returns Nan for data with all zeros. Python returns 0 for such data, is there any way to adjust the two to be consistent?
kurtosis
You can make a judgment with DolphinDB’s iif with the script:
iif
x = matrix(0 0 0 0, 1 2 3 4) iif(sum(x==0) == x.rows(), 0, kurtosis(x))
You can make a judgment with DolphinDB’s
iif
with the script: