Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Two numpy arrays
#1
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?
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  problem adding two numpy arrays djf123 2 2,052 Aug-09-2022, 08:31 PM
Last Post: deanhystad
  how to join by stack multiple types in numpy arrays caro 1 1,110 Jun-20-2022, 05:02 PM
Last Post: deanhystad
  numpy.dot() result different with classic computation for large-size arrays geekgeek 5 1,831 Jan-25-2022, 09:45 PM
Last Post: Gribouillis
  numpy in1d with two simple arrays claw91 3 2,527 Sep-21-2020, 12:43 PM
Last Post: scidam
  Type coercion with Numpy arrays Mark17 2 2,489 Jul-24-2020, 02:04 AM
Last Post: scidam
  filling and printing numpy arrays of str pjfarley3 4 3,211 Jun-07-2020, 09:09 PM
Last Post: pjfarley3
  How to concatenate nested numpy arrays? python_newbie09 2 4,733 Apr-16-2019, 07:00 PM
Last Post: python_newbie09

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020