From an object like `sin(u[k]) + u0[k]` I would like to get the corresponding C code as a string. Since `k` is a variable, I cannot use `MatrixSymbol`, but there's always `IndexedBase` of course. With
```
u = IndexedBase('u')
u0 = IndexedBase('u0')
k = Symbol('k')
y = sin(u[k]) + u0[k]
```
things are looking good, but then
```
from sympy.utilities.codegen import codegen
[(c_name, c_code), (h_name, c_header)] = codegen(("f", y), "C")
```
tells you
```
sympy.tensor.indexed.IndexException:
Range is not defined for all indices in: u[k]
```
I could perhaps go through all `IndexedBase` instances in `y` and `.subs`titute them with a variable with the string `u[k]`, but that feels hackish.
Any hints?