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
There are a ton of routines that are already written for you, saving the work for you. Let's take a look at how to find them. Also let's dive into reduction a bit.
Learn More
My Notes for Universal Functions
## Universal Functions
* [ufuncs](https://docs.scipy.org/doc/numpy/reference/ufuncs.html) are commonly needed vectorized functions
* Vectorized functions allow you to operate element by element without using a loop
* The standard math and comparison operations have all been overloaded so that they can make use of vectorization
* Values can be [broadcasted](https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html), or stretched to be applied to the ufuncs.
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
which allow you to operate element by
element instead of using a loop, and
0:00
standard mathing comparison operators
like plus, minus, multiply, and
0:03
greater than, greater than equal
to they've all been overloaded so
0:07
that they can make use of vectorization,
and values can be broadcasted or
0:11
stretched to be applied to the vector.
0:15
So, remember that two got stretched
all the way across the scalar, or
0:18
we did it by rows.
0:21
Awesome, so we saw some super powerful
ufuncs, and let's go take a look at
0:22
some higher level routines that
make use of them for common tasks.
0:27
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