numpy tutorial - slicing/stacking arrays, indexing with boolean arrays

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

ความคิดเห็น • 92

  • @codebasics
    @codebasics  2 ปีที่แล้ว +2

    Do you want to learn python from me with a lot of interactive quizzes, and exercises? Here is my project-based python learning course: codebasics.io/courses/python-for-beginner-and-intermediate-learners

  • @BrianMantel
    @BrianMantel 2 ปีที่แล้ว +9

    Well done. I really like the fast pace and you still didn't miss anything. This was exactly what I was looking for.

  • @ray811030
    @ray811030 7 ปีที่แล้ว +27

    It's awesome tutorial. Using graph to express what code do is pretty impressive. Appreciate your effort :)

  • @kevinzhang8974
    @kevinzhang8974 7 ปีที่แล้ว +5

    Best tutorial I see so far.... thank you!

  • @Biocreator
    @Biocreator 3 ปีที่แล้ว +1

    Using graph to express what code do is really pretty impressive.

  • @Mehmet-xg5cn
    @Mehmet-xg5cn 2 ปีที่แล้ว +1

    Clear and straightforward. Thank you

  • @wasimlearner25
    @wasimlearner25 6 ปีที่แล้ว +1

    awesome tutorial... being from a no technical background, i enjoy and understand your tutorials better than most online videos.. :)

  • @billwindsor4224
    @billwindsor4224 6 ปีที่แล้ว +1

    Great tutorial on NumPy arrays, array addressing, and array computations - *thank you!*

  • @MakadamSGP
    @MakadamSGP 7 ปีที่แล้ว +2

    Your tutorials are very helpful and very well explained, thank you very much, they are awesome !!!!

  • @tejas8211
    @tejas8211 7 ปีที่แล้ว +1

    Very nice tutorials man. I learned and enjoyed this very much.

  • @quantlfc
    @quantlfc 7 ปีที่แล้ว +3

    Really appreciate your efforts!!! Amazing tutorial!

  • @JMSchomburg
    @JMSchomburg 5 ปีที่แล้ว +1

    Thank you so much! Slicing doesn't take into account the last 'stop at' row indicated, which isn't clearly stated in SciPy documentation (unless I missed it). Anyhow, your tutorial makes things much more intuitive. Merci!

    • @codebasics
      @codebasics  5 ปีที่แล้ว

      Even with regular python lists that is true and they have mentioned it in python documentation. Not sure about scipy docs though. But anyways now you know it and will remember it 😊

    • @JMSchomburg
      @JMSchomburg 5 ปีที่แล้ว

      Did you know that I'm still new to Python (and Numpy)?
      Anyhow, thanks again for making it all clear: something tells me that I'll be returning to your channel again soon ; )@@codebasics

    • @shubham4516
      @shubham4516 4 ปีที่แล้ว

      @@codebasics could you please share the github link

  • @qzorn4440
    @qzorn4440 6 ปีที่แล้ว +1

    fantastic numpy tutorial. thanks.

  • @pathummudannayake6947
    @pathummudannayake6947 6 ปีที่แล้ว +1

    Great stuff. Learnt a lot. 5 stars!

  • @kasyapdharanikota8570
    @kasyapdharanikota8570 3 ปีที่แล้ว

    Thank you very much sir, cleared all my doubts

  • @Gauravsharma-et5kx
    @Gauravsharma-et5kx 7 ปีที่แล้ว

    numpy is super , thanks, hope u give python stuff in future too... ,ur way is too nice

  • @charmindesai3730
    @charmindesai3730 2 ปีที่แล้ว

    A very heartily thanks to you for you awesome videos, thank you so very much !!!

  • @jamjam3448
    @jamjam3448 4 ปีที่แล้ว

    Thanks very much bro. You saved my time.

  • @HelionDark
    @HelionDark 7 ปีที่แล้ว +1

    Good overview! thank you!

  • @nireshbehari8333
    @nireshbehari8333 3 ปีที่แล้ว

    This was a great skill to learn...thank you Bhavel:)

  • @sam-j4zy
    @sam-j4zy 4 ปีที่แล้ว +1

    good job codebasic

  • @rgm2754
    @rgm2754 3 ปีที่แล้ว

    Very good explained,. Just what I was looking for. Thanks

    • @codebasics
      @codebasics  3 ปีที่แล้ว

      Glad it was helpful!

  • @alberteinstein1040
    @alberteinstein1040 7 ปีที่แล้ว +1

    Totally helpful!

  • @alokyarneni6154
    @alokyarneni6154 7 ปีที่แล้ว +6

    please, try to add videos related to scipy, matlplotlib,

  • @iamsantosh
    @iamsantosh 7 ปีที่แล้ว

    Superb tutorial Man. Thumbs up to you.

  • @ashokkumar-lg8tt
    @ashokkumar-lg8tt ปีที่แล้ว

    @ (8:59) how the hsplit works when we call for a np.hsplit(a,3) only by 3???

  • @rionbeats9935
    @rionbeats9935 2 ปีที่แล้ว

    Thanks, helped alot ...
    😄

  • @YashSharma-xh2eh
    @YashSharma-xh2eh 7 ปีที่แล้ว

    great video dude, please do make more.

  • @adhavana8197
    @adhavana8197 5 ปีที่แล้ว

    Thanks for your effort, this was helpful

    • @codebasics
      @codebasics  5 ปีที่แล้ว

      Adhavan, I am glad you liked it.

  • @danielevans5125
    @danielevans5125 5 ปีที่แล้ว

    Thank you for making this - very helpful.

    • @codebasics
      @codebasics  5 ปีที่แล้ว

      My pleasure daniel

  • @ruxinxie9739
    @ruxinxie9739 3 ปีที่แล้ว

    so clear, thank!

  • @awais3791
    @awais3791 2 ปีที่แล้ว

    Thanks for awesome explain

  • @stephaniesu8402
    @stephaniesu8402 6 ปีที่แล้ว

    Great tutorials!

  • @learnsanskrit2110
    @learnsanskrit2110 5 ปีที่แล้ว

    v good tutorial. when u want ppl to focus on last rows of ur screen bring it in center. we have youtube bar and it is not very good user experience ;)
    - A lazy UX guy

    • @codebasics
      @codebasics  5 ปีที่แล้ว

      Thanks for feedback learn Sanskrit. Your point makes sense and I will keep that in mind

  • @saifullahshahen
    @saifullahshahen 4 ปีที่แล้ว +2

    Sir, I just start data science from your channel. I just have completed my python course from udemy. i have two question. please answer me:
    1. should I learn more about NumPy or this is enough for a beginner??
    2. After completing this what should learn next??

  • @rohanrawat3950
    @rohanrawat3950 5 ปีที่แล้ว

    very helpful tutorial sir..much appreciated!

    • @codebasics
      @codebasics  5 ปีที่แล้ว

      Glad to hear that Rohan

  • @DaniloSouzaMoraes
    @DaniloSouzaMoraes 7 ปีที่แล้ว

    excelent series. Thanks!

  • @chandansarkar1123
    @chandansarkar1123 6 ปีที่แล้ว +1

    First of all thanks a lot for the great tutorial. I wanted to ask a small question about the boolean array though.
    In the example you have written b = a > 4 where we are looking for all those elements which returns True for condition > 4. I was trying to create a simple example where I want to check whether the array element is prime or not with a simple function and return boolean. Is there is an easy way to do something like that...

  • @cattivo84
    @cattivo84 7 ปีที่แล้ว

    Very helpful! thank you!

  • @lvbigtime88
    @lvbigtime88 2 ปีที่แล้ว

    Amazing - cheers

  • @apravatiseema6675
    @apravatiseema6675 ปีที่แล้ว

    Awesome sir

  • @sandeepbannu1234
    @sandeepbannu1234 7 ปีที่แล้ว

    your videos are amazing...... completely!!!!!..... But I wish you had problems for us to practice

  • @InformativeVideos423
    @InformativeVideos423 6 ปีที่แล้ว

    Excellent teaching. Superb!!!! Please also do videos on Tensorflow machine learning. I want to save a trained Tensorflow model and then later use it in some another program. How can I do it.

  • @deepalibajpai4465
    @deepalibajpai4465 5 ปีที่แล้ว

    Can you please explain .t transpose function and the use of defining axis (0) or 1 in hstack , vstack etc

  • @totpotator
    @totpotator 7 ปีที่แล้ว

    great video thank you !

  • @luisk6007
    @luisk6007 5 ปีที่แล้ว

    Thank you very much!

  • @sumesht.a8528
    @sumesht.a8528 7 ปีที่แล้ว

    Great teaching. Can you please add videos on matplotlib?

  • @ashish31416
    @ashish31416 4 ปีที่แล้ว

    Thank you so much.

  • @pedrocristovao5157
    @pedrocristovao5157 3 ปีที่แล้ว

    That's gold

  • @yashgaikwad3669
    @yashgaikwad3669 7 ปีที่แล้ว +1

    dude, please make on numpy with images, pixels array and all that stuff

  • @NyiNyi-mj9yt
    @NyiNyi-mj9yt 2 ปีที่แล้ว

    thanks you 🙂

  • @kirankumar5818
    @kirankumar5818 7 ปีที่แล้ว

    nice tutorial

  • @abhijeetkumar3912
    @abhijeetkumar3912 2 ปีที่แล้ว

    Any tutorial for intermediate ??? please share playlist link.

  • @rishabhgarg9217
    @rishabhgarg9217 7 ปีที่แล้ว

    thnks for the information

  • @levendeurdemeches6600
    @levendeurdemeches6600 6 ปีที่แล้ว

    Thank you again

  • @gaganutube2k8
    @gaganutube2k8 7 ปีที่แล้ว

    Awesome...

  • @aniketverma3281
    @aniketverma3281 6 ปีที่แล้ว

    Super!!

  • @anilgupta-dy1oj
    @anilgupta-dy1oj 5 ปีที่แล้ว

    superrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr

  • @inspirational_talkings2099
    @inspirational_talkings2099 6 ปีที่แล้ว

    Appreciate your efforts....Sir.....Are these 4 videos sufficient for numpy ???.......

    • @inspirational_talkings2099
      @inspirational_talkings2099 6 ปีที่แล้ว

      Okk sir..... thank you very much sir..... appreciate your efforts....!!

    • @ravikumarb8053
      @ravikumarb8053 6 ปีที่แล้ว

      could you suggest any project a beginner for better understanding of numpy, python?

  • @fatinafiqah.y938
    @fatinafiqah.y938 7 ปีที่แล้ว

    Hi, your video is awesome and i understand every part of it but i got this code about the index thingy and I got the error 'index 4 is out of bounds for axis 1 with size 4' and i really dont know how to fix it. So, i really hope that you can teach on how to fix this cause i need to finish it for my assignment

    • @fatinafiqah.y938
      @fatinafiqah.y938 7 ปีที่แล้ว

      codebasics tq for your rply..but when i see your video it say that we can do like that if im not mistaken haha but anyway tq

    • @fatinafiqah.y938
      @fatinafiqah.y938 7 ปีที่แล้ว

      Hai could you pls check over my code..and is there any medium for me to give you the code so that you can check it..it is my pleasure if youre able to give me one medium of yours

  • @sukanyak9975
    @sukanyak9975 29 วันที่ผ่านมา

    Nice

  • @karankrishna8556
    @karankrishna8556 7 ปีที่แล้ว

    how to insert a value into numpy array from keyboard

  • @bhageerathbabuprathi1043
    @bhageerathbabuprathi1043 7 ปีที่แล้ว

    Very Helpful.. Thank you

  • @iamsanketray
    @iamsanketray 7 ปีที่แล้ว +1

    is this series completed or are there more videos coming?

    • @girishjahagirdar4379
      @girishjahagirdar4379 7 ปีที่แล้ว

      codebasics you should show how to add numbers to an empty bumpy array

  • @sougatamaity9619
    @sougatamaity9619 8 หลายเดือนก่อน

    enjoying

  • @mounabarhoumi7584
    @mounabarhoumi7584 6 ปีที่แล้ว

    I divide a 3D image into small patches, these patches, I will process them (for example I will convert each patch into a vector,), my problem is that how can I extract these patches with their positions from the original image, I could only extract the patches and not with the positions (code in python), the code is attached
    def patch_extract_3D (input, patch_shape, xstep = 1, ystep = 1, zstep = 1):
    patches_3D = np.lib.stride_tricks.as_strided (input,
    (int ((input.shape [0] - patch_shape [0] + 1) / xstep),
    int ((input.shape [1] - patch_shape [1] + 1) / ystep),
    int ((input.shape [2] - patch_shape [2] + 1) / zstep),
    patch_shape [0], patch_shape [1], patch_shape [2]),
    (input.strides [0] * xstep,
    input.strides [1] * ystep,
    input.strides [2] * zstep,
    input.strides [0],
    input.strides [1],
    input.strides [2]))
    patches_3D = patches_3D.reshape (patches_3D.shape [0] * patches_3D.shape [1] * patches_3D.shape [2],
    patch_shape [0], patch_shape [1], patch_shape [2])
    # = Adjoint3D
    return (patches_3D)
    input is an 3D matrix
    and thank you for your help :)

  • @yashtrivedi6830
    @yashtrivedi6830 4 ปีที่แล้ว

    Hello Sir,
    I want to grab an index of an array from its value. How can I do it?
    X1 = np.array([1,0,1])
    X = np.array([[1,1,1],[1,1,0],[1,0,1],[1,0,0],[0,1,1],[0,1,0],[0,0,1],[0,0,0]])
    I want to grab index of X when X1 == X
    Can I do it?
    How can I do it?

    • @codebasics
      @codebasics  4 ปีที่แล้ว

      You can use np.where. Check this: thispointer.com/find-the-index-of-a-value-in-numpy-array/ I've not tried this on complex object like array within array but just try it and let me know if it works.

  • @vamsisaggurthi5528
    @vamsisaggurthi5528 6 ปีที่แล้ว

    Good

  • @horriabayan
    @horriabayan 3 หลายเดือนก่อน

    sir, why didn't you prefer doing it on pycharm

  • @aasimbaig01
    @aasimbaig01 7 ปีที่แล้ว

    is ravel and flat function same???

    • @igniculus_
      @igniculus_ 7 ปีที่แล้ว

      flat returns a copy
      ravel returns original (if possible)

  • @EcExplorer
    @EcExplorer 3 ปีที่แล้ว

    AttributeError: 'numpy.ndarray' object has no attribute 'falt'

  • @himanshushekhar26
    @himanshushekhar26 6 ปีที่แล้ว

    Don't know, why few people pressed unlike button.

  • @swatibothra1458
    @swatibothra1458 6 ปีที่แล้ว

    nice videos... :)

  • @snehashashidhar757
    @snehashashidhar757 6 ปีที่แล้ว

    Take a bow ... :) :)

  • @Biocreator
    @Biocreator 3 ปีที่แล้ว

    :)