NumPy is one of my favorite packages. Itβs one of the most powerful numeric packages available on any programming languages..Tied with Python, it makes for a quick script fiddling with a lot of numbers..Did you know that you could develop your machine learning algorithms in NumPy? Thatβs how I initially learned to implement my AI algorithms..Btw, does anyone have the answer to guruβs question in the last line of code? π€
.
π¨βπ»#NumPy
.
π¨βπ»#NumPy
Letβs continue our NumPy discussion, shall we? π .
I found NumPyβs matmul and multiply confusing when I was starting out, so why not compare them in a post?
.
matmul is the equivalent of the dot product between two matrices, where the last dimension of the first matrix has to be equal to the first dimension of the second matrix. Easy, right? πͺ
.
On the other hand, multiply is the convenient operation of taking two same size matrices and multiplying them element wise. This will come in handy when we talk about building deep neural nets π
.
Donβt forget to swipe to see the code examples βΌοΈβΌοΈ
.
Question: NumPy has another operation called βdotβ π€― what do you think that does (hint is in this post)
.
π¨βπ»#NumPy
I found NumPyβs matmul and multiply confusing when I was starting out, so why not compare them in a post?
.
matmul is the equivalent of the dot product between two matrices, where the last dimension of the first matrix has to be equal to the first dimension of the second matrix. Easy, right? πͺ
.
On the other hand, multiply is the convenient operation of taking two same size matrices and multiplying them element wise. This will come in handy when we talk about building deep neural nets π
.
Donβt forget to swipe to see the code examples βΌοΈβΌοΈ
.
Question: NumPy has another operation called βdotβ π€― what do you think that does (hint is in this post)
.
π¨βπ»#NumPy
Hello data scientists π and welcome to the post of the day π .Itβs time we talk about NumPy slicing. NumPy slicing is a very common technique to manipulate large data π.It can be used with any number of dimensions of data with the same syntax π€.Here I was able to extract my favorite fruits from a large array of food items. Neat, right? π‘.Keep in mind array[:, 1:3] will take all the rows (:) and columns 1 and 2 of the dataset.
.
π¨βπ»#NumPy
.
π¨βπ»#NumPy
Hiii data scientists ππ.Hope your week is off to a great start.I know I couldnβt start mine properly without talking about some NumPy π€¦π»ββοΈ.3 new functions and a useful concept for today, shall we? π.zeros(), ones() and diag() are three super useful functions I use all the time using NumPy. They give us the three basic matrixes: matrix of zeros, ones, and a diagonal matrix with specific values, respectively π.Doing arithmetic with NumPy matrices is super easy, unless what youβre doing is a matrix operation, all other operations occur at element level such a scalar multiplier and scalar addition π.Liked todayβs lesson? Let me know what you would like to learn next
.
π¨βπ»#NumPy
.
π¨βπ»#NumPy