‫I've seen a fair few different ways of manipulating a race, but right at the top of this section,
‫we're not going to go right up the top because it's pretty lengthy already.
‫We called it manipulating and comparing a race.
‫So that's what we're going to cover in this video as comparison operators will make a nice little hitting
‫comparison operators.
‫Beautiful.
‫That's how we spell operators change it to mock down.
‫Now, you might have seen comparison operators in Python.
‫Well, the good news is that in umpire race, you can use those same comparison operators.
‫So let's have a look.
‫Let's get back our trusty a one and a two arrays.
‫Wonderful.
‫So let's try it out.
‫We want a one greater than a two.
‫What's this going to return?
‫It's going to return another array because that's the fundamental data type of numpy.
‫Basically, everything is an array, an end, the array.
‫It's going to tell us whether.
‫Each element in a one is greater than each element in a two.
‫So you can see one is not greater than one.
‫It's equal to one.
‫Two is not greater than two.
‫It's equal to two.
‫Three is not greater than 3.3 because 3.3 is higher.
‫So let's have another look.
‫Let's go a one greater than or equal to a two.
‫Ah, now we can see we've got some true.
‫So we've got some bullying data.
‫Type's been returned in this array.
‫So maybe if we go ball array equals that ball array, we want to see that and then we want to go type.
‫We know the type, let's see it anyway.
‫Type.
‫It's going to be in the array.
‫And then if we also wanted Bola Ray de type, it's going to be data type ball.
‫So this array is full of booleans here.
‫Wonderful.
‫So now we can see again we've got a one.
‫Let's try another comparison of just a simple integer A1 greater than five.
‫Not false.
‫False, false.
‫Okay.
‫One Lesson five.
‫True, true.
‫True.
‫Wonderful.
‫We want to see if two arrays are equal.
‫We can use the equal then comparison operator.
‫That's a mouthful for me.
‫True, true.
‫True.
‫That makes sense.
‫We go a one equals a two.
‫Wonderful.
‫We can see that the first two elements.
‫Oh, let's go back down.
‫So we're not scrolling all the time.
‫A one.
‫Another cell here A2 and we can see.
‫Yeah, element zero is true.
‫Element one is true and then the rest aren't equal.
‫Okay.
‫Now, if you wanted to find more of these comparison operators, we've just been through a few.
‫You can try out some of your own.
‫Let's look up the documentation number by comparison operators.
‫Logic functions.
‫Yeah.
‫Let's have a look at this.
‫All any array contents.
‫So there's a fair few here.
‫Less, less.
‫Equal.
‫We can use these symbols here.
‫Okay.
‫So there's a fair few more that we can do, but these are the main ones that you'll need.
‫If you ever need to compare arrays, you can use the exact same symbols that you use in Python with
‫NumPy.
‫So that's going to wrap up the manipulating and comparing arrays section.
‫Let's go have a look at the next part.
‫I'll see you in the next video.