Skip to main content
NumPy

NumPy

SoftwareWikipedia

Search complete. 158 mentions across 49 episodes found for "NumPy".

Nov 13, 2026

Harrison KinsleyHOST
3:40
So yeah, that's a cleaner, more dynamic way of doing inputs times the weights plus the bias for a layer in Python.
Harrison KinsleyHOST
3:50
Now we're still going to transition to doing this with NumPy and doing vectors and matrices and stuff like that, but this is a cleaner way.
Harrison KinsleyHOST
3:59
And if you're following along in some other language, obviously the answer is to use loops.
Harrison KinsleyHOST
4:07
So now the next thing I want to touch before we get into the NumPy stuff is we're still getting a lot of questions on weights and biases.
Harrison KinsleyHOST
4:15
So I just want to clear that up as quickly as possible.
Harrison KinsleyHOST
4:18
So weights and biases are these knobs that I say we tune, but really down the line, it's going to be the optimizer that tunes these values in an attempt to fit to some data.
Harrison KinsleyHOST
7:22
So these are just two different tools that help in two different ways and and that's it So anyways, I think this will make more sense as we especially get into Activation functions and like rectified linear.
Harrison KinsleyHOST
7:34
It should be unbelievably obvious what bias can do for you But anyway, just for now hopefully you can see that there are two different tools doing two different things and if we have millions of these little tools that we can sort of tweak we can change the overall kind of outputs and Now, with that in mind, let's get into transitioning into more real mathematics rather than this stuff.
Harrison KinsleyHOST
13:33
All right, so let's go ahead and transpose the weights.
Harrison KinsleyHOST
13:36
Now, to do that, we're actually going to convert weights to a NumPy array.
Harrison KinsleyHOST
13:39
Now, why do we need to do that? So right now, inputs and weights are lists of lists in Python.
Harrison KinsleyHOST
13:45
When we pass those to NumPy's dot product function here, what's happening is in the back end, these inputs and this weight these are actually getting converted to NumPy arrays.
Harrison KinsleyHOST
13:55
But since we want to use NumPy to transpose the weights, we actually are going to convert weights now to NumPy array weights.
Harrison KinsleyHOST
14:04
And then to transpose that, it's actually just dot capital T.
Harrison KinsleyHOST
14:08
Boom, transpose.

11 MINS LATER

Harrison KinsleyHOST
24:56
So in this case, you're going to pass a batch.
Harrison KinsleyHOST
27:11
Actually, there's two reasons we're going to use this NNFS package.
Harrison KinsleyHOST
27:14
The first is for stuff like NumPy.
Harrison KinsleyHOST
27:17
So our goal and our hope here is that everybody can follow along and get the same values as we do, at least if they want to.
Harrison KinsleyHOST
27:25
Obviously, again, if you're following along in another language or maybe you want to change things and not do things exactly the same way as I'm doing, which is totally fine, but if you want to confirm that you're doing things correctly, you need to be able to repeat the results that we get.
Harrison KinsleyHOST
27:57
So it won't work very well just as a heads up.
Harrison KinsleyHOST
28:01
But you'll also need to always be doing that.
Harrison KinsleyHOST
28:02
So instead, what we're going to do is we're going to import nnfs and then do nnfs.init. And besides setting the random seed, the other thing nnfs init is doing for us is it's setting a default data type for NumPy to use.
Harrison KinsleyHOST
28:17
So for whatever reason, the dot product for NumPy, we only found this out after getting many people in the document and finding some people were getting slightly different values, and it was very weird.
Paul AllenGUEST
64:27
So Travis Oliphant, who just moved to Utah after 25 years in Austin, you guys should interview Travis.
Paul AllenGUEST
64:33
He invented NumPy and SciPy.
Paul AllenGUEST
64:35
He created Anaconda, which is a $1 or $2 billion company to distribute Python into enterprise.
Paul AllenGUEST
64:41
Travis is one of the top three or four people in the world in the Python ecosystem.
Paul AllenGUEST
64:46
He's the reason Python was the language for AI.
Paul AllenGUEST
64:50
Yeah.
Paul AllenGUEST
64:50
because he built NumPy and SciPy.
Paul AllenGUEST
64:54
So Travis is an investor and we hired some of his AI experts to build custom ML models back in 2020.
Harrison KinsleyHOST
12:22
Those values should be pretty close to what's in the book.
Harrison KinsleyHOST
12:25
It actually isn't exactly, but this isn't using NumPy.
Harrison KinsleyHOST
12:29
So the values should line up, I think, when we're using NumPy.
Harrison KinsleyHOST
12:33
We'll confirm that when we get there.
Harrison KinsleyHOST
12:36
But so the NNFS, first of all, we're not even initializing the NNFS package, but that is part of what the init package is doing.
Harrison KinsleyHOST
13:00
So that's the raw Python implementation.
Harrison KinsleyHOST
13:04
And again, if you're coming from some other language, you would need to implement this in your language.
Harrison KinsleyHOST
13:09
But now the next thing that we're going to do is convert this to NumPy.
Mathew MadhavacherilGUEST
15:08
To read in a map, you can use the end map module and just say we have Okay, so what this does is it opens up the fits file, looks in the fits headers, and then loads in a map.
Mathew MadhavacherilGUEST
15:31
A really important point I want to make around here is that the way that maps work in pixel is by pixel basically extends the NumPy array.
Mathew MadhavacherilGUEST
15:43
So if you're familiar with working with NumPy arrays, then pixel is really fun to use.
Mathew MadhavacherilGUEST
15:48
because anything that you can do to a numpy array, it inherits all of the properties of numpy array, but it extends on top of that by adding this WCS object, which we just talked about as a world coordinate system object.
Mathew MadhavacherilGUEST
16:01
So this particular command is going to load in the FITS header.
Mathew MadhavacherilGUEST
17:02
All right, so once this is loaded in, we're going to print out the shape and dtype or data type of the sample array.
Mathew MadhavacherilGUEST
17:14
And you can see it's a two-dimensional array with shape 1505 and 3521, which means that there's 1,505 pixels along the y-direction and 3,521 along the x-direction.
Mathew MadhavacherilGUEST
17:30
And this is, you know, the most basic structure that you can have in an ND map, which is an extension of a NumPy array.
Harrison KinsleyHOST
9:55
So let's just look at it real quick.
Harrison KinsleyHOST
9:58
We don't have NumPy.
Harrison KinsleyHOST
9:59
Let's import NumPy as np.
Harrison KinsleyHOST
10:04
Save that.
Harrison KinsleyHOST
10:05
Run it.
Network ChuckHOST
14:20
First of all, you would need some hardware, servers with GPUs.
Network ChuckHOST
14:23
Then you would also need a bunch of tools and libraries and SDKs like PyTorch and TensorFlow, Pandas, NumPy, Scikit-learn, Transformers and FastAI.
Network ChuckHOST
14:32
The list goes on.
Network ChuckHOST
14:33
You need lots of tools and resources in order to fine tune an LLM.
Harrison KinsleyHOST
3:40
Now, what we'll do for this is, again, it needs to weight the closer or more recent data more.
Harrison KinsleyHOST
3:49
And luckily for us, NumPy has exponential kind of like built into it, so we can kind of use it.
Harrison KinsleyHOST
3:54
So anyway, weight equals np.exp. And then we want to use np.linspace, negative 1, comma, 0, comma, and then the window.
Harrison KinsleyHOST
4:11
Now, the next thing we want to do is say weights divided by equal weights.sum.
Harrison KinsleyHOST
10:06
We're going to be using math for math.log.
Harrison KinsleyHOST
10:08
In the previous example, I used numpy.log.
Harrison KinsleyHOST
10:11
But we're going to use math.log because this is neural networks from scratch in Python, and NumPy is kind of cheating.
Harrison KinsleyHOST
10:18
So this is how we get around that.
Harrison KinsleyHOST
10:20
So we'll use math in this example.

39 more episodes mention NumPy.

Create an account to see the whole feed, search across every transcript, and follow the entities you care about.

We value your privacy

We use cookies to understand how you use our platform and to improve your experience. Click “Accept All” to consent, or “Decline non-essential” to opt out of non-essential cookies. Read our Privacy Policy.