Python Forum
Two numpy arrays - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Two numpy arrays (/thread-32064.html)



Two numpy arrays - Sandra2312 - Jan-18-2021

I have two numpy arrays (3, n) which represent 3D coordinates.

I want to calculate the distance to every point in array B for each point in array A, but only save the minimum distance.

Since I know that many points are the same, it would be good to delete rows that are identical in both arrays.

Can someone help me?


RE: Two numpy arrays - paul18fr - Jan-18-2021

I think this topic has ever been tackled in the following post using the Kronecker product (numpy.kron); the limitation is the number of elements that conditions the size of the vectors and the amont of RAM accordingly.