Reputation: 13
I just realized that the "=" operator in Julia acts more like a pointer for matrices than an assignment. For example, if I have a matrix A and I set a new matrix B with B=A, then any modification to B will also apply to A. Instead, I want to initialize B with A, but any changes that I make to B I do not want to apply to A. My current solution is to use Julia's copy() function, but it seems to take a non-negligible amount of time, and it seems like using copy() is a clunky solution. Any solutions/work-arounds would be greatly appreciated. Thank you!
I have a solution to my problem [copy()], but I assume there is a better solution out there.
Upvotes: 0
Views: 318