Broadcast in 0.6 changing abstractarray type?

Hello,

I have been trying to get module NamedArrays up to scratch with Julia-0.6 in the past while. I am now stuck at a change in behaviour of broadcast(). In Julia-0.5 and NamedArrays, this used result in type NamedArray:

using NamedArrays
n = NamedArray(rand(2,4))
typeof(broadcast(-, n, mean(n,1))

The type of the broadcast result for Julia-0.6 is Array. I think this is because of new logic involving things like Base.Broadcast.containertype, where I was hooking into broadcast_t. Does anyone have a hint on how I can make broadcast return a NamedArray again?

Cheers,

I asked a similar question a while ago, and got very detailed and helpful advice which I think answers your question.

2 Likes