Hey there. Thank you for your reply: so I tried it out and it seems like the code works in REPL but when I use it in my larger project it does not work: the reason why I have a very redundant looking dataset constructor is because this is actually a part of a larger object. To reproduce the error I am getting, you could clone and run python example.py on : https://github.com/DhananjayAshok/PySR/tree/lgga with https://github.com/DhananjayAshok/SymbolicRegression.jl/tree/LGGA
However as per your question on mutable vs immutable structs, I originally tried to do this without redefiining X and y but while I can append or push to y which is array when I try to append or push to a Array{T, 2} it gives me an error. If I had
a = rand(3, 100) b = rand(3, 10) append!(a, b) push!(a, b)
neither of those work, is there a way to in place extend a with b?
I have also tried cat but it seems cat! does not exist so how can I do this?