Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8656497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:17:23+00:00 2026-06-12T15:17:23+00:00

I am trying to compare a one dimensional array in a collection of 1

  • 0

I am trying to compare a one dimensional array in a collection of 1 dimensional array using python. For example:

import numpy as np;
data= np.array( [  [1,2] , [2,3] ,[3,4], [1,2] , [0,9] ])
#I want to get the indexes of [1,2] which are 0 and 3 for above list

Does anyone have an idea how to implement that in python?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:17:24+00:00Added an answer on June 12, 2026 at 3:17 pm
    In [116]: data = np.array( [  [1,2] , [1,3] ,[3,4], [1,2] , [0,9] ])
    
    In [117]: np.where(np.prod(data == [1,2], axis = -1))
    Out[117]: (array([0, 3]),)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to compare data from one file to another to see if it
I'm trying to compare two strings. One stored in a file, the other retrieved
I am trying to compare values on data frame rows, and removing all the
I'm trying to compare one item <span class=x>123</span> with a group of items on
I am trying to compare two NSDates one is created by the viewDidLoad method
I am trying to compare if the value of one BigInteger(base) is > (greater
I am trying to compare 2 strings but i just realized that one has
I'm trying to compare the equality of two multi-line strings. I'm getting one of
I am trying to compare two byte arrays in memory and produce a data
I'm trying to compare one attribute value to another, if it returns true i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.