Array Manipulation | reshape and resize | NumPy Tutorials | Python Programming
Вставка
- Опубліковано 27 сер 2019
- In this Python Programming video tutorial you will learn about array manipulation in detail. We will discuss about the reshape and resizing array.
NumPy is a library for the Python programming language, adding support for large, multi-dimensional arrays and matrices, along with a large collection of high-level mathematical functions to operate on these arrays.
reshape: Change the shape of given array without changing its size.
resize : Change the shape as well as size of the array .
#numpy #Python
For more free tutorials on computer programming
/ amulsacademy
/ amulsacademy
Ur skill of explanation is really appreciable, go ahead 😊
Amazing video!
❤️ ur teaching... U gave example using resize for creating bigger size new array.. is it possible to decrease the size of the new array?
very good...
You are way of teaching lovely Can you make a complete notes of Numpy
very good knowledge
This video is awesome, Shoutout
Thank you :)
you can also explain what happens when we pass -1 as one of the parameters in reshape
awesome tutorial
Huge respect from pakistan
Thank you :)
Hi I'm working with a custom yolov3 .weights file and I'm trying to convert it to a .tf file format however when it reaches this line in a utils.py file:
conv_weights = conv_weights.reshape(
conv_shape).transpose([2, 3, 1, 0])
this error happens: ValueError: cannot reshape array of size 264247 into shape (256,128,3,3)
I'm asking this here because I want to understand the logic behind it, con_shape has the values (256,128,3,3)
Thank you Mam
In easy way explain
in w3schools reshape syntax is : a.reshape(1,3) like this they added array before reshape. here you are putting array inside the reshape. what is the difference?
Thanks for explanation.BUt there is small doubt here numpy.resize(5,2) filled the additional elements by repeating the array values where as a.resize(5,2) added zeros to the additional elements,is this how the function behaves
Yes :)
thanks sis ........ make more
Sure :)
i don't understand the rows and column wise how its working?
on what occassion we must use reshape?
Mam could you please make a video on linked list,I just need to know how it works.
I will try :)
@@AmulsAcademy Thanks a lot!
How reshape and resize works for 3D arrays?? You didnt mentioned anything about that.
like 2d array and 1d array, you can reshape and resize 3d arrays {in the same way}.
How feel your pain brother, I also had the same problem, but this is what i figured out. Your size and your dimension are directly related. I if you multiply all your dimensions together you will get your size. So if you want to reshape a specific array you need to make sure that when you multiply all the dimension of the new array that you want you get the size of the old array. You can do this by dividing one of the dimension of your array with the new dimension that you want to add. I actually posted about this on stackoverflow so you can check it out
what a beautiful voice , fallen for your voice.