Python NumPy Tutorial for Beginners #2 - Indexing Arrays

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024

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

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

    Just a quick note! In the comments/hashtags I wrote down lists - these should be ARRAYS! So just ignore the commas. Apologies for the mistake! The comments have been corrected on the code uploaded to my Github😊 Link here:
    github.com/code-of-the-future/Python-NumPy-Tutorials/blob/main/NumPy_Tutorial_2.py

  • @Rex_ults
    @Rex_ults 6 หลายเดือนก่อน +1

    still helping even after 3 years❤

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

    Another really informative video, thanks for putting it together! It'd be really interesting to find out more about what you did on your internship and how you used arrays for it! btw can't believe you've almost hit 4k subscribers, congrats! Once you get to 10k or something, you should think of putting a course or something together, maybe something to do after your final year at uni - I think with your teaching style it would do really well 😁

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

      Thank you so much, Andrew!! I was thinking of releasing a video where I talk about the programming I did on my internship! Just to show there are so many different paths in technology, not all of them are software engineering roles😊Thank you so much!! I was also thinking of doing that! Then giving people certificates they can put on their LinkedIn/CV😄something to think about after third year, definitely!! Thank you again for all your support, it means the world☺️

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

      @@CodeoftheFuture yeah that would be really great! I've been really getting into Python/programming since watching your videos, and think it's something I'd like to do in the future, so it'd be great to get your take on different paths that you've found out about 😁 yeah that's a great idea, I could see something like that doing really well!! Awh your welcome, your channel deserves it! Thanks for the quality videos 😊

  • @nishantthakuribm
    @nishantthakuribm 9 หลายเดือนก่อน

    Great Video ! Thank you for your videos.. !!

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

    Coming from Instagram, love ur videos 😍

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

    thank you very much

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

    thanks!

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

    waited for this one

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

    3:30 But what if I don't want to select only one element but two elements of the array? Print (array [0,2]) doesn't work for example.

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

    Good one ❤️

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

    Good one thanks btw

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

    I understand that in Python indexing begins with 0, but my question would be why has been Python designed like this? I mean the designers of Python could've easily define to start with 1, but they decided to start with 0, why didn't they decide otherwise?

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

      Since the beginning of time (the 1950's) there have been two choices for this (actually, PL/I used to go crazy in the 70's and allow you to index your arrays with say, 29 thru 108, if you chose). The reason that 0 makes more sense than 1 for this choice (you can see I am biased) is that the machine can directly multiply the index by the size of the element to compute the address of what to get. So 0 is right at the beginning, so 0 times whatever size the elements are is still zero, we get the first one. The fourth one will be starting at 3 times the element size, etc. -- So, 0-based indexing is the most exact translation to what the computer will be doing inside at runtime. Sometimes, that is very obscure and mystifying and we pay a price in performance or memory or whatever to hide confusing little details, but it really is no harder to work with 0-based indexing where ARRAY_SIZE is the first index that is NOT there, than with 1-based indexing where ARRAY_SIZE is the last index that is there, once you get used to it. So, I would say that is why all the many languages that have chosen 0-based indexing would explain why they did it, pretty much.

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

      @@jvsnyc ty but 1 is much more intuitive, as far as I know indexing in R for example starts with 1.

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

      @@Kig_Ama As much as I realize that parallelism and good algorithms, not screaming fast code, are the way to performance these days, having 1-based arrays just seems inefficient, I've probably done too much assembly and C and C++ to feel 0 is unnatural.

  • @SandeepBishwakarma-wl5ne
    @SandeepBishwakarma-wl5ne 3 ปีที่แล้ว

    First comment ❤️😌

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

    Thank You, I recently started learning Python through this channel. I had few queries so I sent the same on Instagram. I have time kindly help out.

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

      Thank you for joining me! :) Instagram has been incredibly hectic and I have been inundated with a lot of messages! Please send me another message on Instagram for it to come to the top of my feed - I can't seem to find you! I have had over 1000 messages in the past week😂Or... if you copy your queries into the comments I can help you that way or if you follow us on Twitter, I can follow you back and try and help you out through messaging on there! :)

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

      @@CodeoftheFuture ok in some time I will come up with my Twitter profile and connect with you.

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

      @@anishnair3055 brilliant! :)

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

    c++

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

    c++

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

    c++

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

    c++