We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41e4c61 commit 6b508dbCopy full SHA for 6b508db
src/stan.rs
@@ -104,7 +104,7 @@ fn params(
104
let mut variables = Vec::new();
105
let mut start_idx = 0;
106
for (name, idxs) in &name_idxs?.iter().group_by(|(name, _)| name) {
107
- let shape: Vec<usize> = idxs
+ let mut shape: Vec<usize> = idxs
108
.map(|(_name, idx)| idx)
109
.fold(None, |acc, elem| {
110
let mut shape = acc.unwrap_or(elem.clone());
@@ -117,6 +117,7 @@ fn params(
117
Some(shape)
118
})
119
.unwrap_or(vec![]);
120
+ shape.iter_mut().for_each(|max_idx| *max_idx = (*max_idx) + 1);
121
let size = shape.iter().product();
122
let end_idx = start_idx + size;
123
variables.push(Parameter {
0 commit comments