Closed daanhb closed 5 years ago
I think we just need to add a Ref
to stop it broadcasting over the domain: UnionDomain(setdiff.(elements(d1), Ref(d2)))
I had a different fix, but using Ref
is nicer and I could use it elsewhere too. I'll submit.
Elsewhere, I was broadcasting over in
: in.(xs, domain)
gives a similar error. I suppose I could do in.(xs, Ref(domain))
there as well. At first I had disabled broadcasting for domains, but we may want to use it like you mentioned elsewhere to conveniently create maps as in d .* 2
.
Fixed by 9dd60ff
The problem is the use of broadcast in setdiff for a UnionDomain and a Domain:
The offending line is this one: broadcast is not appropriate here.