Broadcasting not on all arguments

Either you want

predict_consumption.(Ref(myCar), distances)

or define something like

Base.broadcastable(x::CarModel) = Ref(x)

to do this automatically for your type. See the manual on broadcasting.

7 Likes