Closed ChengYen-Tang closed 1 year ago
In the last release, I did find a way to reduce some of the code. Have a look.
I don't see how the sample you provided can be used to copy data from a numpy array to a multi-dimension .net array. Unfortunately I think it has to be done in a brute looping method like I did. Each element from the numpy array needs to be selected because it could be sliced view.
I just think that the previous method is not beautiful. There are 705 lines of code when converting ndarray to Array, and there is an upper limit of supported dimensions. Therefore, I provide a short and flexible method, although the principle is to copy elements one by one.
I just want to help improve the maintainability of this library, the redundant code makes a file too big to read I'm just thinking like this, nothing else
I think your previous method is too brute force, so I help you clean up the codeš¤£ https://github.com/Quansight-Labs/numpy.net/issues/43#issuecomment-1343859790