Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to NumPy!
You have completed Introduction to NumPy!
Preview
Slicing an ndarray is similar to slicing a list. In NumPy, however slicing creates a view instead of a copy.
My Notes for Boolean Array Indexing
## Boolean Array Indexing
* You can create a boolean array by using comparison operators on an array.
* You can use boolean arrays for fancy indexing.
* Boolean arrays can be compared by using bitwise operators (`&`, `|`)
* Do not use the `and` keyword.
* Remember to mind the order of operations when combining
* Even though boolean indexing returns a new array, you can update an existing array using a boolean index.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
flawlessly, like no matter
how good you ever were at it.
0:00
It's where that saying use it or
lose it comes from.
0:00
Well for me, in addition to juggling,
0:02
that skill I need to dust
off is slicing an object.
0:04
You've probably used slices
before on lists or tuples, but
0:08
if you haven't done it for a while,
you could be a little [SOUND] klutzy.
0:11
This is where practice comes in.
0:15
And I want to encourage you to
practice and test things out.
0:17
Let's practice a bit of slicing
with lists first just to warm up.
0:20
And then let's practice with
some multi-dimensional arrays.
0:24
It's like starting with these practice
juggling balls instead of, say, chainsaws.
0:26
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up