Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Numpy question
#4
yep!

np.where just returns a data structure with the locations of what you want.

so I would do something like so:


a[np.where(a>0)]
Reply


Messages In This Thread
Numpy question - by pberrett - Apr-27-2019, 05:35 AM
RE: Numpy question - by rxndy - Apr-27-2019, 08:37 AM
RE: Numpy question - by pberrett - May-04-2019, 09:45 AM
RE: Numpy question - by rxndy - May-12-2019, 11:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  numpy newbie question bcwilly_ca 4 1,246 Feb-10-2023, 05:55 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

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