Skip to content
Lex Fridman PodcastLex Fridman Podcast

Travis Oliphant: NumPy, SciPy, Anaconda, Python & Scientific Programming | Lex Fridman Podcast #224

Travis Oliphant is a data scientist, entrepreneur, and creator of NumPy, SciPy, and Anaconda. Please support this podcast by checking out our sponsors: - Novo: https://banknovo.com/lex - Allform: https://allform.com/lex to get 20% off - Onnit: https://lexfridman.com/onnit to get up to 10% off - Athletic Greens: https://athleticgreens.com/lex and use code LEX to get 1 month of fish oil - Blinkist: https://blinkist.com/lex and use code LEX to get 25% off premium EPISODE LINKS: Travis's Twitter: https://twitter.com/teoliphant Travis's Wiki Page: https://en.wikipedia.org/wiki/Travis_Oliphant NumPy: https://numpy.org/ SciPy: https://scipy.org/about.html Anaconda: https://www.anaconda.com/products/individual Quansight: https://www.quansight.com PODCAST INFO: Podcast website: https://lexfridman.com/podcast Apple Podcasts: https://apple.co/2lwqZIr Spotify: https://spoti.fi/2nEwCF8 RSS: https://lexfridman.com/feed/podcast/ Full episodes playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4 Clips playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOeciFP3CBCIEElOJeitOr41 OUTLINE: 0:00 - Introduction 1:11 - Early programming 22:52 - SciPy 39:46 - Open source 51:29 - NumPy 1:28:44 - Guido van Rossum 1:41:02 - Efficiency 1:49:54 - Objects 1:56:52 - Numba 2:05:58 - Anaconda 2:10:25 - Conda 2:26:01 - Quansight Labs 2:29:37 - OpenTeams 2:37:10 - GitHub 2:42:40 - Marketing 2:47:18 - Great programming 2:58:08 - Hiring 3:02:06 - Advice for young people SOCIAL: - Twitter: https://twitter.com/lexfridman - LinkedIn: https://www.linkedin.com/in/lexfridman - Facebook: https://www.facebook.com/lexfridman - Instagram: https://www.instagram.com/lexfridman - Medium: https://medium.com/@lexfridman - Reddit: https://reddit.com/r/lexfridman - Support on Patreon: https://www.patreon.com/lexfridman

Lex FridmanhostTravis Oliphantguest
Sep 23, 20213h 5mWatch on YouTube ↗

EVERY SPOKEN WORD

  1. 0:001:11

    Introduction

    1. LF

      The following is a conversation with Travis Oliphant, one of the most impactful programmers and data scientists ever. He created NumPy, SciPy, and Anaconda. NumPy formed the foundation of tensor-based machine learning in Python, SciPy formed the foundation of scientific programming in Python, and Anaconda, specifically with Conda, made Python more accessible to a much larger audience. Travis's life work across a large number of programming and entrepreneurial efforts has and will continue to have immeasurable impact on millions of lives by empowering scientists and engineers in big companies, small companies, and open source communities to take on difficult problems and solve them with the power of programming. Plus, he's a truly kind human being, which is something that when combined with vision and ambition, makes for great leader and a great person to chat with. To support this podcast, please check out our sponsors in the description. This is the Lex Fridman podcast, and here is my conversation with Travis Oliphant.

  2. 1:1122:52

    Early programming

    1. LF

      What was the first computer program you've ever written? Do you remember?

    2. TO

      Whoa. That's a good question. I think it was in fourth grade. Just a simple, uh, loop in Basic.

    3. LF

      Basic?

    4. TO

      Basic, yeah, on an Atari 800, uh, Atari 400, I think, or maybe it was an Atari 800. It was, uh, part of a class, and we just were, just basic loops to print things out.

    5. LF

      Did you use go-to statements?

    6. TO

      Um, yes. Yes, we used go-to statements. (laughs)

    7. LF

      (laughs) I, I remember in the early days, that's when I first realized there's, like, principles to programming-

    8. TO

      Yeah.

    9. LF

      ... when I was told that don't use go-to statements.

    10. TO

      Yeah.

    11. LF

      Those are bad software engineering prince, like, it goes against what great, beautiful code is. And I was like, "Oh, okay, there's rules to this game."

    12. TO

      (laughs)

    13. LF

      (laughs)

    14. TO

      I didn't see that until high school when I took an AP Computer Science course.

    15. LF

      Right.

    16. TO

      I d- I did a lot of other kinds of just low, programming on TI, but finally when I took an AP Computer Science course in Pascal.

    17. LF

      Pas... Wow.

    18. TO

      That's, yeah, it was Pascal. That's when I, "Oh, there are these principles."

    19. LF

      Not C or C++?

    20. TO

      No, I didn't take C until (laughs) ha- uh, the next year in college. I had this course in C, um, but I, I haven't done much in Pascal, just that AP Computer Science course. (laughs)

    21. LF

      Now, sorry for the romanticized question, but when did you first fall in love with programming?

    22. TO

      Oh, man. Good question. I think actually when I was 10. You know, my dad got us a TI- Timex Sinclair, and, uh, he was excited about the spreadsheet capability, and then, but I made him get the, uh, Basic, the add-on so we could actually program in Basic. And just being able to write instructions and have the computer do something. Then we got a TI-90, a TI-99/4A when I was about 12, and I would just, it had sprites and graphics and music. You could actually program it to do music. That's when I really sort of fell in love with programming.

    23. LF

      So, this is a full, like, a real computer with like, uh, with memory and storage-

    24. TO

      Yeah.

    25. LF

      ... and processor and whatnot?

    26. TO

      Yeah, the Timex-

    27. LF

      'Cause you say TI, it's not-

    28. TO

      Yeah, the Timex Sinclair was one of the very first. It was a cheap, cheap, like I think it was... Well, it was still expensive, (laughs) but it was 2K of memory. We got the 16K add-on pack.

    29. LF

      Mm-hmm.

    30. TO

      Uh, but yeah, it had memory and you could program it. You had the, in order to store your programs, you had to attach a tape drive. Remember that old, the sound that would play when you-

  3. 22:5239:46

    SciPy

    1. TO

    2. LF

      I don't know what to start talking to you about 'cause you've been... You've created (laughs) so many incredible projects that basically changed the whole landscape of programming. But okay, let's start with, uh, let's go chronologically with SciPy. You created SciPy over two decades ago now?

    3. TO

      Yes.

    4. LF

      Is that right? Is it-

    5. TO

      Yes. Love to talk about SciPy. SciPy-

    6. LF

      (laughs)

    7. TO

      ... was really my baby. (laughs)

    8. LF

      (laughs) What is it?

    9. TO

      Yeah.

    10. LF

      Uh, what was its goal? What is its goal? How does it work?

    11. TO

      Yeah, fantastic. So SciPy was effectively... Here I am using Python-

    12. LF

      Mm-hmm.

    13. TO

      ... to do stuff that I previously used MATLAB to use. And I was using Numerical, which is an array library that made a lot of it possible. But I... You know, there's things that were missing. Like, I didn't have an ordinary differential equation solver I could just call, right? I didn't have integration. Yeah, I wanted to, uh, to integrate this function. Okay, well, I don't have just a function I can call to do that. Um, these are things I remember being critical things that I was missing. Optimization. I just wanna pass a function to an optimizer and have it tell me what the optimum value is. Uh, those are things like, "Well, why don't we just write a library that adds these tools?" And I started to post on the mailing list, and there'd previously been... You know, people have discussed. I remember Conrad Henson saying, "Wouldn't it be great if we had this optimizer library?" Or-

    14. LF

      Yeah.

    15. TO

      ... David Ash would say this stuff. And, and I'm... You know, I'm a ambitious... Uh, uh, ambition is the wrong word. An eager (laughs) and, uh, probably more time than sense, I was, you know, a poor graduate student.

    16. LF

      (laughs)

    17. TO

      Uh, my wife thinks I'm working on my PhD, and I am, but part of a PhD that I loved was the fact that it's exploratory.

    18. LF

      Mm-hmm.

    19. TO

      Right? You're not just, you know, taking orders fulfilling, uh, a list of things to do. You're trying to figure out what to do. And so I thought, "Well, you know, I'm writing tools for my own use in a PhD, so...... I'll just start this project. And so in '99, '98 was when I first started to write libraries for Python. Effectively, when I fell in love with Python in '98, I thought, "Oh, well, there's just a few things missing." Like, oh, I need a reader to read DICOM files, that was in medical imaging and DICOM was a format that I wanted to be able to load that into Python. Okay, how do I write a reader for that? So I wrote something called... It was an IO package, right?

    20. LF

      Mm-hmm.

    21. TO

      And that was my very first extension module, which is C. So I wrote C code to extend Python so that the pos- in Python, I could write things more easily. That, that combination kind of hooked me. It was the idea that I could, here's this powerful tool I can use as a scripting language and a high-level language to think about, but that I can extend easily.

    22. LF

      In C?

    23. TO

      Easily in, in C. The easily for me because I knew enough C.

    24. LF

      Right.

    25. TO

      And then Guido had written a lang- I mean, the only, the hard part of extending Python was something called the way memory management works, and you have to do reference counting. And so there's, there's a tracking of reference counting you have to do manually. And if you don't, you have a ref- you have memory leaks (laughs) . And, uh, so that's hard. Plus then C, you know, it's just much more... You have to put more effort into it. It's not just I have to now think about pointers and I have to think about stuff that is different. I have to kind of... You're like putting a new cartridge in your brain.

    26. LF

      Mm-hmm.

    27. TO

      Like, you're... Okay, I'm thinking about MRI, now I'm thinking about programming, and, and there are distinct modules you (laughs) end up having to think about. So it's harder. And when I was just in Python, I could just think about MRI-

    28. LF

      Right.

    29. TO

      ... and high-level wro- writing. Um, but I could do that, and that kind of... I liked it. I found that to be enjoyable and fun, and so I ended up, "Oh, let me just add a bunch of stuff to Python to do integration." Well, and the cool thing is, is that, you know, the power of the internet, just looking around, and I found, oh, there's this NetLib, which has hundreds of Fortran routines that people had written in the '60s and the '70s and the '80s in Fortran 77, fortunately, it wasn't Fortran 60. So they've been mo- ported to Fortran 77.

    30. LF

      Mm-hmm.

  4. 39:4651:29

    Open source

    1. TO

      So I'm not opposed to proprietary software.

    2. LF

      Yeah.

    3. TO

      I'm actually not an open source zealot. I love open source for the... what it brings, but I also see the role for proprietary software. But what I didn't like was the fact that I would develop code and publish it, and then effectively telling somebody, "Here, to run my code, you have to have this proprietary software."

    4. LF

      Right. And there's also culture around MATLAB as much, because I've talked to a few folks at, uh, MathWorks creates MATLAB?

    5. TO

      Yeah.

    6. LF

      Yeah. I mean, there's just a culture, they try really hard, but it's just there's this corporate IBM style culture that's like-

    7. TO

      Yes. Yes.

    8. LF

      ... or whatever. I don't, don't want to say negative things about IBM or whatever, but there's a, is a-

    9. TO

      No, it's, it's, it's really that connection. It's something I'm in the middle of right now is, is the business of open source-

    10. LF

      Right. Right.

    11. TO

      ... and how do you connect the ethos of cooperative development with the necessity of, of creating profits?

    12. LF

      Right.

    13. TO

      Right. And, like, right now today, you know, I'm still, I'm still in the middle of that. That's actually the early days, uh, of, of me exploring this question. Because I was writing SciPy, I mean, as an aside, I also had... so I had three kids at the time. I have six kids now.

    14. LF

      Yeah.

    15. TO

      I got married early, wanted a family. Uh, I had three kids and I remember reading... I remember I read Richard Stallman's post and I was, I was a fan of Stallman. I would read his work. I liked this collective ideas he would have. Certainly the ideas on IP law, I read a lot of his stuff. But then he said, you know, "Okay, well, how do I make money with this? How do I make a living? How do I pay for my kids?" All this stuff was in my mind, young graduate student making no money thinking, "I got to get a job." And he said, "Well, you know, I think just be like me and don't have kids." Right. That's... just don't, don't-

    16. LF

      That's his take on this? That's his side?

    17. TO

      That was his... that was, that was the, what, what he said in that moment, right?

    18. LF

      Yeah.

    19. TO

      That's the thing I read and I went, "Okay, this is a train I can't get on." (laughs)

    20. LF

      Yeah. There has to be a way to preserve the culture of open source and still be able to make sufficient money to feed your kids.

    21. TO

      Yes, exactly. There's got to be. Well, so that actually led me to a study of economics. Because at the time I was ignorant and I really was, and I'm actually... I'm embarrassed for educational system that they could let me... and I was valedictorian of my high school class and I did super well in college and, like, academically I did great.

    22. LF

      Mm-hmm.

    23. TO

      Right. But the fact that I could do that and then be clueless about this key part of life, it led me to go, "There's a problem." Like, I should, like, I should have learned this in fifth grade. I should have learned this in eighth grade. Like, everybody should come out with a basic knowledge of economics.

    24. LF

      You're an interesting example because you've created tools that, uh, change the lives of probably millions of people and the fact that you don't understand at the time of the creation of those tools, the basics economics of how-

    25. TO

      Yeah.

    26. LF

      ... like, to build up giant system is a problem. (laughs)

    27. TO

      Yeah, it's a problem. And so I... during my PhD at the same time, this is actually in '98, '99 at the same time, I was in the library, I was reading books on capitalism, I was reading books on Marxism, I was reading books on, you know, what is this thing? What, what does it... what does it mean?

    28. LF

      Yeah.

    29. TO

      And I encountered a... I basically, what I... I encountered a set of writings from people that said they were the inheritors of Adam Smith.

    30. LF

      Mm-hmm.

  5. 51:291:28:44

    NumPy

    1. TO

      At the same time, 2001 timeframe, there was a little bit of, um, like the Hubble Space Telescope.

    2. LF

      Mm-hmm.

    3. TO

      The folks at Hubble had started to say, "Hey Python, we're gonna use Python for processing images from Hubble." And so Perry Greenfield was, uh, a good friend and, uh, and running that program. And he had called me before I left to BYU and said, "You know, we wanna do this, but num- Numeric actually has some challenges in terms of, you know, it's not a... The array doesn't have enough types. Uh, we need more operations. You know, broadcast needs to be a little more settled." Uh, they wanted record arrays. They wanted, you know, record arrays are like a data frame, but a little bit different. But they wanted more structured data. So he had called me even early on then and he said, "You know, way, would you wanna work on something to make this work?" And I said, "Yeah, I'm interested, but I'm going here and I, you know, we'll see if I have time." So in the meantime, while I was teaching and, and SciPy was emerging, and I had a student... I was constantly, while I was teaching, trying to figure out a way to fund this stuff. So I had a graduate student, uh, my only graduate student, uh, a Chinese fellow, uh, Hong- Liu Hongzhe is his name. Great guy. He wrote a bunch of stuff for iterative, iterative linear algebra.

    4. LF

      Mm-hmm.

    5. TO

      Like, got into writing some of the iterative linear algebras, uh, tools that are currently there in SciPy and emer- and have, they've gotten better since. But this is in 2005, kept working on SciPy. But Perry had started working on a replacement to Numeric called NumArray.

    6. LF

      Mm-hmm.

    7. TO

      And in 2004, a package called NDImage, it was an image processing library-

    8. LF

      Nice.

    9. TO

      ... that was written for NumArray, and it had in it a morphology tool. I don't know if you know what morphology is.

    10. LF

      Mm-hmm. Mm-hmm.

    11. TO

      It's open dilations, closed... You know, there's sort of this... As a medical imaging student, I knew what it was because it was used in segmentation a lot.

    12. LF

      Mm-hmm.

    13. TO

      And in fact, I'd wanted to do something like that in Python, in SciPy, but just had never gotten around to it. So when it came out that it worked only on Numer- on NumArray, and SciPy needed Numeric. And so we effectively had the beginning of this split.

    14. LF

      Mm-hmm.

    15. TO

      And Numeric and NumArray didn't share data, they were just two... So you could have a gigabyte of Numer- NumArray data and gigabyte of Numeric data, and they wouldn't share it.

    16. LF

      Yeah.

    17. TO

      And so you had these, and you had these scientific libraries written on top. I got really bugged by that.

    18. LF

      Yeah.

    19. TO

      I got really like, "Oh man, this is not good. We're not cooperating now. We're not... We're sort of redoing each other's work and we're just, this young community." So that's what led me... Even though I knew it was risky because my, uh, you know, I had... I was on a tenure track position, 2004 I got reviewed. They said, "Hey, things are going okay. You're doing well. Paper's coming out, but you kind of spend a lot of time on this open source stuff. Maybe do a little less of that and a little more of the paper writing and grant writing." Which was naive, but it was definitely the time, you know, the thinking that-

    20. LF

      Still goes on.

    21. TO

      Still goes on.

    22. LF

      You're basically creating a thing which enables science in the 21st century.

    23. TO

      Right.

    24. LF

      Um, maybe don't emphasize that so much in your-

    25. TO

      Right.

    26. LF

      ... for your tenure.

    27. TO

      Right. (laughs) It illustrates some of the challenges.

    28. LF

      Yes.

    29. TO

      It, it, it does. It's, and it's... People mean well-

    30. LF

      Yes.

Episode duration: 3:05:24

Install uListen for AI-powered chat & search across the full episode — Get Full Transcript

Transcript of episode gFEE3w7F0ww

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.

Add to Chrome