Type of composition of functions is not predictable

I’m not sure what is happening on this line, but this does not appear to be valid Julia syntax. It appears that you are attempting to create an anonymous function and assign it to a global variable η_. This global variable is referred to in η(r).

For η(r) to be type stable, it should not refer to a global variable. The global variable η_ can change types. Because η_ change change, it is impossible to infer the type. You should probably make this global a constant.

1 Like