|
|
|
|
|
by credit_guy
434 days ago
|
|
I don't think this is such a great solution. With regular numpy you can create functions that take arrays with arbitrary shapes. It is not easy, as the author explained in a prior post, but it is doable. But with loops this just doesn't work. The number of nested loops depends on the shape of the inputs. My solution, very, very inelegant, was to focus on the scalar case, and ask Copilot to vectorize my code. I did that just the last two days. It is not all that easy. Copilot will give you something, but you still need to tweak it. In the end, I still had to write line by line the code, and make sure I understand what it is doing. |
|