Session 14 - Advanced Numpy | Data Science Mentorship Program (DSMP) 2022-23 | Free Session

Поделиться
HTML-код
  • Опубликовано: 30 дек 2024

Комментарии • 46

  • @mohitdhillon3153
    @mohitdhillon3153 Год назад +3

    Thanks!

  • @nikunjjain5212
    @nikunjjain5212 Год назад +13

    Every topic is easy...if aap pdha rhe hai . Broadcasting is Crystal clear 😉.
    Thank you 😊

  • @123arskas
    @123arskas 2 года назад +19

    You're a Monster, a Beast. I can't even memorize the stuff that you explain even though I understood it all and practiced it all. Meanwhile you just know everything. You're awesome.

    • @abdulhannan-go8hl
      @abdulhannan-go8hl Год назад +3

      off course, he is a gem, bro. i wonder itna brilliant b koi ho skta hai

    • @karankeshav1
      @karankeshav1 Год назад +1

      It's not that much difficult, although he has a teaching experience as well as working experience...so for a person who has both type of experience , it's not that much difficult to teach something. But also he is working hard and teaching and managing all the things itself

  • @priyanshuprajapati539
    @priyanshuprajapati539 5 месяцев назад +2

    20:20
    It won't throw an error because `np.arange` clips (or wraps around) values that fall outside the representable range of `np.int8`. Here's a breakdown of what happens:
    1. **`np.arange(10000000, dtype=np.int8)`:** This line attempts to create a NumPy array named `a` with elements ranging from 0 (inclusive) to 9999999 (exclusive) using the `int8` data type.
    2. **`int8` Range:** As you know, `int8` can only store values from -128 to 127.
    3. **Clipping:** Since the requested starting and ending points (0 and 9999999) are within the representable range of `int8`, `np.arange` doesn't raise an error. However, any numbers generated beyond the valid range are "clipped" to fit within the limits.
    **In essence, the array `a` will actually contain:**
    * The first 127 elements will be values from 0 to 127 (as intended).
    * The remaining elements (up to 9999999) will be "wrapped around" and start over from -128. This repetition continues until the desired length (10000000) is reached.
    **`sys.getsizeof(a)`:** This line calls the `sys.getsizeof` function to determine the size of the array `a` in bytes. This size will reflect the actual memory allocated for the array, which depends on the number of elements and the data type used.
    While no error is thrown, this behavior might not be what you intended. If you need to store numbers within the range 0 to 9999999, you should consider using a larger data type like `np.int16` or `np.int32` that can accommodate these values.

    • @priyanshuprajapati539
      @priyanshuprajapati539 5 месяцев назад +2

      Clipped off and wrapped around, in the context of NumPy arrays and data types, refer to how values outside the representable range of a data type are handled. Here's a breakdown of each term:
      **Clipped Off:**
      * When a value attempts to exceed the maximum positive value a data type can store, it gets "clipped" to the maximum.
      * Similarly, if a value tries to fall below the minimum negative value, it gets "clipped" to the minimum.
      Imagine a data type with a range of 0 to 100. Any number greater than 100 would be "clipped" down to 100, and any number less than 0 would be "clipped" up to 0.
      **Wrapped Around:**
      * This concept applies specifically to signed integer data types, like `int8` in your example.
      * If a value attempts to exceed the maximum positive value (e.g., 127 for `int8`), it doesn't raise an error. Instead, it "wraps around" and starts over from the minimum negative value (-128 for `int8`). This continues in a cyclical pattern.
      Think of it like a circular number line. Reaching the end (maximum) makes you jump back to the beginning (minimum) and continue counting.
      **Example:**
      ```python
      import numpy as np
      # Array with values outside int8 range
      arr = np.array([150, -130, 5], dtype=np.int8)
      print(arr) # Output: [-6, 127, 5]
      # 150 is clipped to the maximum (127)
      # -130 is wrapped around to the minimum (127) and then clipped to -128
      # 5 remains within the range
      ```
      Here, 150 is clipped to 127, the maximum representable value for `int8`. -130 is wrapped around to -128 (minimum) but since -128 is also the minimum limit, it stays there. Finally, 5 remains unchanged as it falls within the valid range.
      **Key Points:**
      * Clipping off generally occurs with both signed and unsigned integer data types.
      * Wrapping around is specific to signed integer data types where values can cycle through the range.
      * It's important to choose a data type that can accommodate the range of values you intend to store in your NumPy arrays.
      I hope this explanation clarifies the concepts of clipping off and wrapping around!

  • @pradhumn5503
    @pradhumn5503 2 месяца назад +1

    Best channel for data science on the whole youtube

  • @rohinisingh6916
    @rohinisingh6916 8 месяцев назад +2

    You are the great sir . awesome explanation ☺️.

  • @anilrathore.bigthink
    @anilrathore.bigthink Год назад +1

    really increadible! ultimate pro max teacher

  • @descendantsoftheheroes_660
    @descendantsoftheheroes_660 Год назад +1

    GOD BLESS YOU SIR....INDIA MAKE GREAT AGAIN

  • @tanvirhasanmahmud
    @tanvirhasanmahmud 2 года назад +4

    Nice Video

  • @SameerAli-nm8xn
    @SameerAli-nm8xn Год назад +1

    Sir you are the best 🙏🙏

  • @raosajid6578
    @raosajid6578 2 года назад +2

    great explanation sir

  • @somanshkumar1325
    @somanshkumar1325 Год назад +1

    Super Amazing session. Very much informative, thoroughly enjoyed the session. Thank you so much, Nitish :)

  • @sajjaduddin8188
    @sajjaduddin8188 3 месяца назад +1

    Thank you once again

  • @Shaikh-Ji
    @Shaikh-Ji 2 года назад +2

    yes we can hear you sir thank you

  • @DeepakPandey-dv8cn
    @DeepakPandey-dv8cn 2 года назад +2

    thank so much sir

  • @lokeshagarwal6373
    @lokeshagarwal6373 Год назад +1

    very very Nice Sir

  • @makarsh29
    @makarsh29 2 месяца назад

    best teacher ever

  • @siddhigolatkar8558
    @siddhigolatkar8558 Год назад +1

    Thank you Sir

  • @DeepakPandey-dv8cn
    @DeepakPandey-dv8cn 2 года назад +1

    excellent sir

  • @amanJ9
    @amanJ9 6 месяцев назад

    Bro aap Sabse achcha padhate hai ❤❤❤❤

  • @mehediazad1780
    @mehediazad1780 Год назад +1

    thank you

  • @yasirbhatti7607
    @yasirbhatti7607 Год назад +3

    sir chat gpt tell that your channel is best for learning data science

  • @shwetan1250
    @shwetan1250 Год назад +1

    Sir want to join this mentorship program due to got this on Christmas holiday. But i think i m late to join now what to do .😔😔🤨🤨

  • @prashantmaurya9635
    @prashantmaurya9635 8 месяцев назад

    IDK why, but when you said "haan, main missing value hu" is too funny for me. 🤣🤣🤣 BTW a great explanation.

  • @jyothsnaraajjj
    @jyothsnaraajjj 2 года назад

    Excellent

  • @sujithsaikalakonda4863
    @sujithsaikalakonda4863 Год назад +1

    Wonderful session sir.

  • @araban3409
    @araban3409 2 месяца назад

    feeling sad for those who don't find this channel.

  • @jasmeetkaur-zy9mq
    @jasmeetkaur-zy9mq Год назад

    but sir , this rules cannot be applied upon all the examples, like:
    (3,2) (3)

  • @subenakhatun-z2r
    @subenakhatun-z2r 8 месяцев назад

    I want to join this course but do not have a credit card. I am from Bangladesh. please Sir make any system that's why outside India anyone can join.

  • @umangmittal750
    @umangmittal750 Год назад

    Can anyone provide me the solution of the task given in each class session? Please

  • @balrajprajesh6473
    @balrajprajesh6473 2 года назад

    Best

  • @AmritSwarn-x5u
    @AmritSwarn-x5u 4 месяца назад

    Bhai phir ye int8 1 crore ko kaise store kar lega at 17:59 if it can only store up to 256?

    • @nishitnishikant8548
      @nishitnishikant8548 Месяц назад

      Its values ..not the number itself
      The maximum value that could be represented by an 8 bit number is 255, so the range would be 0-255 (256 values).
      So the number having 256 bits in binary.
      What is the max 8 byte integer value?
      -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      So no issue with just 1cr.

  • @Who_care360
    @Who_care360 Год назад +1

    love you sir

  • @ShivamKumar-sp2dh
    @ShivamKumar-sp2dh Год назад

    i want to join the paid membership for whole data science course

  • @itsentertainment9054
    @itsentertainment9054 2 года назад

    What is yr website name.....u are great for students

  • @pradeepdas410
    @pradeepdas410 9 месяцев назад

    data science course fee???

  • @yatinshekhar787
    @yatinshekhar787 3 месяца назад

    29/140

  • @himau2434
    @himau2434 10 дней назад

    thank you sir!