I have learned that all datatypes of the NumPy library have their minimum and maximum values. Understanding the minimum and maximum values of a NumPy data type is useful because it can help prevent overflow or underflow errors when working with large or small numbers. By knowing the range of values that can be stored in a data type, I can design my code to handle potential overflow or underflow errors appropriately, such as by using a larger data type or by scaling the input data to a smaller range. I have found a code that works correctly. Here it is below:My query is to find an alternative method that provides similar functionality. If anyone knows, share them with me.