Learn practical skills, build real-world projects, and advance your career

Numpy Functions you didn't know existed.

Numpy is a general-purpose array-processing package. It provides a high-performance multidimesional array object, and tools for working with these arrays

List of Functions we are going to discuss-

  • frexp
  • floor
  • accumulate
  • squeeze
import numpy as np
# list of functions discussed.
function1 = np.frexp
function2 = np.floor
function3 = np.accumulate
function4 = np.squeeze

Function 1 - np.frexp

It returns mantissa and exponent as a pair (m, e) of a given value x, where mantissa m is a floating point number(lies in the open interval(-1, 1)) and e exponent is an integer value. m is a float and e is an integer such that x == m * 2**e exactly.

# Example1- 
import math


a = np.frexp(8)
b = np.frexp(-2)
c = np.frexp(0.45)