sd() on greta_array does not return a greta_array
Open
enhancement
- Dominant language
- C++
- Stars
- 607
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 1
Description
Hi there, with the code below, applying `sd()` on a `greta_array` does not return the same class. Just wondering if it's intentional?
```
library(greta)
x <- normal(0, 1, dim = 10)
sd(x) # class numeric
mean(x) # class greta_array
```
I'm want to generate some calculated quantities by scaling using `sd(x)` so it'd be nice if it returns a `greta_array`. I could use `var(x)` or `scale(x)` (both return `greta_array`) but they are clunky in their own ways...
This was using `greta_0.4.1.9000` on `R version 4.1.3 (2022-03-10)`
Contributor guide
Assessment
This issue has not been assessed yet.