3min chapter

The Array Cast cover image

PyTorch and Dex with Adam Paszke

The Array Cast

CHAPTER

The Differences Between for Loops and Indicators in DEX

The core language is based around for loops and ultimately it decomposes to scalar compute. But if you look through like the built-in library, there is map, there is reduced, there is, I don't know, fold. So it's less about always expressing your DEX program in terms of loops and indices. It's more you have two options. You can do it with the array style, if you will, whatever that looks like in DEX. Or if you find that cumbersome or inconvenient, you can switch over back to sort of for loops and indices as well.

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode