Actually I guess you mean [f(a)] instead of b[f(a)]? That’ll match slightly better with the other version. If this is true, then no it’s impossible, [f(a)] will always return a single element array, no exceptions (unless you break the internal implementation since this behavior is implemented in julia after all), so you cannot make it equal to a multiple element array. [a...] would be the closest to what you are asking for but is strongly recomented against if you want to do this many times. [a;] is also equivalent in this case and should be much faster. Of course neither of them are useful since these are just fancy/inefficient ways to spell copy(a). You need to be more specific about your actual problem.
1 Like