Open wesm opened 1 month ago
An example for creating complex in R, which can be evaluated with Mean/Median, but no SD/min/max.
z <- complex(real = stats::rnorm(100), imaginary = stats::rnorm(100))
> mean(z)
[1] -0.03505+0.07687i
> median(z)
[1] -0.1236+1.367i
I think it probably makes sense to return "undefined" for the SD/min/max (rather than returning a bogus number) and just hide these statistics in the UI. Should be pretty simple to do
I think it probably makes sense to return "undefined" for the SD/min/max (rather than returning a bogus number) and just hide these statistics in the UI. Should be pretty simple to do
Yah, I think we should not calculate or at least hide the other stats that aren't valid.
In Python at least,
np.std
on complex numbers yields NaN, as discussed in #3420:We should decide on the expected behavior and make it consistent between R and Python