Stéphane, sorry for the confusion (I should have made myself clearer before), but the new version of the blog post is not correct, in that the difference between 1-X and 1.-X has nothing to do with Int64 vs Float64, but rather with the difference between the operators `-` (minus) and `.-` (dot-minus, i.e. element-wise-minus). That's because the expressions above are parsed as 1 - X and 1 .- X so the number on the left is always an Int. (Using spaces around operators is always advisable for clarity anyway, and in this case where ambiguity can arise it may become mandatory at some point.) So the main points are:
i) when dealing with Arrays, `-` and `.-` are distinct. In Julia 0.2 you are allowed to use `Number - Array` (or `Array + Number` etc.), but in upcoming Julia 0.3 you'll receive a warning telling you to use `Number .- Array` instead (or `Array .+ Number` etc.), and you would only use `-` (and `+`) between Arrays of the same shape. ii) using an Int is no problem, it will get automatically promoted and there is no ambiguity, and this is not going to change. On Sat, Apr 12, 2014 at 5:50 PM, Stéphane Laurent <[email protected]>wrote: > Thank you everybody. I have updated my blog > post<http://stla.github.io/stlapblog/posts/KantorovichWithJulia.html>, > especially to include Carlo's comments. > Unfortunately I have some problems to use JuMP (I have opened another > discussion about it). And installing pycddlib on Windows 64bit is a real > nightmare. >
