## Python Numpy Where

np.where

Oh right so we have a giant matrix A and another smaller matrix be in this video we’re going to use Np.where to change and manipulate the matrices how we want.

np.where can take in up to 3 parameters, the array of booleans, the array to keep values, and a replacement array. I will show you how it works with some examples.

all right so let’s going with our examples. First we will just give np.where a mask on b where b 0. This will give back indices where the condition is met.

Lets do the same thing with A

In this next example we will give a few more parameters .

This is a Python anaconda tutorial for help with coding, programming, or computer science. These are short python videos dedicated to troubleshooting python problems and learning Python syntax. For more videos see Python Help playlist by Rylan Fowers.

▶️Watch Latest Python Content: https://www.youtube.com/watch?v=myCPg

▶️Watch Latest Other Content: https://www.youtube.com/watch?v=2YfQs

🎵Theme Music: https://www.bensound.com/royalty-free

#PythonMarathon #LearnPython #PythonTutorial

Source

### Comment List

• Rylan Fowers
November 24, 2020

very gud, thanks dad!

• Rylan Fowers
November 24, 2020

thank you, great tutorial!!

• Rylan Fowers
November 24, 2020

background music is annoying. too loud

• Rylan Fowers
November 24, 2020

rekd by the music.

• Rylan Fowers
November 24, 2020

learned what i came for in the first 60 seconds. nice

• Rylan Fowers
November 24, 2020

THIS WAS SO HELPFUL THANK YOU SO MUCH!!

• Rylan Fowers
November 24, 2020

I could do without the background music. This may all be ho-hum stuff to you, but it's new to me, and I'm into my 10th hour today studying. It is not helpful to have distracting music playing.

• Rylan Fowers
November 24, 2020

First rate videos, like always; thanks for sharing!

• Rylan Fowers
November 24, 2020

Thank you !! so helpful !! 🙂 🙂