Matching an array to a row in Numpy

前端 未结 1 1675
悲&欢浪女
悲&欢浪女 2020-12-10 09:04

I have an array \'A\' of shape(50,3) and another array \'B\' of shape (1,3).

Actually this B is a row in A. So I need to find its row location.

I used

相关标签:
1条回答
  • 2020-12-10 09:53

    You can specify the axis:

    numpy.where((A == B).all(axis=1))
    
    0 讨论(0)
提交回复
热议问题