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

Поділитися
Вставка
  • Опубліковано 15 лис 2024

КОМЕНТАРІ • 43

  • @nikunjjain5212
    @nikunjjain5212 Рік тому +12

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

  • @123arskas
    @123arskas Рік тому +17

    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

  • @pradhumn5503
    @pradhumn5503 Місяць тому +1

    Best channel for data science on the whole youtube

  • @priyanshuprajapati539
    @priyanshuprajapati539 4 місяці тому +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 4 місяці тому +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!

  • @rohinisingh6916
    @rohinisingh6916 6 місяців тому +2

    You are the great sir . awesome explanation ☺️.

  • @sajjaduddin8188
    @sajjaduddin8188 Місяць тому +1

    Thank you once again

  • @descendantsoftheheroes_660
    @descendantsoftheheroes_660 Рік тому +1

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

  • @somanshkumar1325
    @somanshkumar1325 Рік тому +1

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

  • @anilrathore.bigthink
    @anilrathore.bigthink Рік тому +1

    really increadible! ultimate pro max teacher

  • @SameerAli-nm8xn
    @SameerAli-nm8xn Рік тому +1

    Sir you are the best 🙏🙏

  • @makarsh29
    @makarsh29 24 дні тому

    best teacher ever

  • @mohitdhillon3153
    @mohitdhillon3153 Рік тому +2

    Thanks!

  • @tanvirhasanmahmud
    @tanvirhasanmahmud Рік тому +4

    Nice Video

  • @raosajid6578
    @raosajid6578 Рік тому +2

    great explanation sir

  • @DeepakPandey-dv8cn
    @DeepakPandey-dv8cn Рік тому +2

    thank so much sir

  • @lokeshagarwal6373
    @lokeshagarwal6373 Рік тому +1

    very very Nice Sir

  • @siddhigolatkar8558
    @siddhigolatkar8558 Рік тому +1

    Thank you Sir

  • @Shaikh-Ji
    @Shaikh-Ji Рік тому +2

    yes we can hear you sir thank you

  • @yasirbhatti7607
    @yasirbhatti7607 Рік тому +2

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

  • @DeepakPandey-dv8cn
    @DeepakPandey-dv8cn Рік тому +1

    excellent sir

  • @amanJ9
    @amanJ9 5 місяців тому

    Bro aap Sabse achcha padhate hai ❤❤❤❤

  • @araban3409
    @araban3409 26 днів тому

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

  • @mehediazad1780
    @mehediazad1780 Рік тому +1

    thank you

  • @prashantmaurya9635
    @prashantmaurya9635 7 місяців тому

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

  • @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 .😔😔🤨🤨

  • @jasmeetkaur-zy9mq
    @jasmeetkaur-zy9mq Рік тому

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

  • @jyothsnaraajjj
    @jyothsnaraajjj Рік тому

    Excellent

  • @sujithsaikalakonda4863
    @sujithsaikalakonda4863 Рік тому +1

    Wonderful session sir.

  • @subenakhatun-z2r
    @subenakhatun-z2r 6 місяців тому

    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.

  • @AmritSwarn-x5u
    @AmritSwarn-x5u 2 місяці тому

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

  • @umangmittal750
    @umangmittal750 Рік тому

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

  • @balrajprajesh6473
    @balrajprajesh6473 Рік тому

    Best

  • @itsentertainment9054
    @itsentertainment9054 Рік тому

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

  • @ShivamKumar-sp2dh
    @ShivamKumar-sp2dh Рік тому

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

  • @pradeepdas410
    @pradeepdas410 8 місяців тому

    data science course fee???

  • @yatinshekhar787
    @yatinshekhar787 Місяць тому

    29/140

  • @Who_care360
    @Who_care360 Рік тому +1

    love you sir