3 ms·
I recently had some murky thoughts on my ideal Matlab replacement, and it would have a feature like this. It would be huge for array-oriented programming:
by blt 11y ago
I recently had some murky thoughts on my ideal Matlab replacement, and it would have a feature like this. It would be huge for array-oriented programming:
func train_model(X: [n d], y: [n 1])
So many lines of code are spent verifying that the sizes of two function arguments are compatible.
- jdminhbg 11y agoYou can do this in Julia now, with many of the affordances you'd expect from Matlab. function train_model(X::Array{Float64,d}, y::Array{Float64,1})
- shele 11y agoOther example: Fixed size matrix multiplication in https://github.com/SimonDanisch/FixedSizeArrays.jl https://github.com/SimonDanisch/FixedSizeArrays.jl depends on element type T and dimensions MxN and NxR: function *{T, M, N, R}(a::Mat{M, N, T}, b::Mat{N, R, T})