The Real Python Podcast cover image

Using NumPy and Linear Algebra for Faster Python Code

The Real Python Podcast

00:00

Using Loops in Machine Learning

Nested loops are incredibly expensive. So we would be stuck doing this if we didn't have this concept of three dimensional or higher arrays in NumPy. It's getting a lot of mileage out of it. Yeah, the example I think you're using had to do kind of comparing, like how far away things are from each other. Exactly. That's actually a super common operation in data science work. And yeah, I don't know if this gets into the next one of where we have more dimensions, but the main head and distance, you kind of determining how close things were. Does that lead into the next thing? A little bit.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app