You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into the following problem using JuliaLang/julia#22060 (comment) which I think may also apply to your code: Consider a .* (b ./ c) where a and b are regular numbers/arrays and c is the container type we want to protect from broadcast. This turns into broadcast(f, a, b, c), i.e. the special argument is in the fourth position. In both @ylxdzsw's hack and yours I think only second and third arguments are checked, but the "special" argument can occur anywhere in the argument list.
I had run into this problem before in AutoGrad and someone had suggested a workaround for defining a method signature which would apply "if at least one of the variable number of arguments is of the special type". Trying to find that hack now...
I ran into the following problem using JuliaLang/julia#22060 (comment) which I think may also apply to your code: Consider
a .* (b ./ c)whereaandbare regular numbers/arrays andcis the container type we want to protect frombroadcast. This turns intobroadcast(f, a, b, c), i.e. the special argument is in the fourth position. In both @ylxdzsw's hack and yours I think only second and third arguments are checked, but the "special" argument can occur anywhere in the argument list.I had run into this problem before in AutoGrad and someone had suggested a workaround for defining a method signature which would apply "if at least one of the variable number of arguments is of the special type". Trying to find that hack now...