greta-dev / greta-dev/greta

replace values in a variable greta array?

Open
#196 2 comments 1 reaction 0 assignees View on GitHub
documentation
Dominant language
C++
Stars
607
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
1

Description

This errors:
```r
x <- normal(0, 1, dim = 3)
x[1] <- 0
```
> ```
> Error: cannot replace values in a variable greta array
> ```

But it needn't, we're just creating a new greta array `x` which is an operation.

I'm not sure whether allowing this would make for a clearer or a less clear interface. The first random variable will still be floating around, and its density will be included in the joint model (though as an unconnected independent variable).

This issue is just a reminder to think about this in the future. Any input very welcome!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.