numpy.nper() in Python Last Updated : 28 Nov, 2018 Comments Improve Suggest changes Like Article Like Report numpy.pmt(rate, pmt, pv, fv, when = ‘end’) : This financial function helps user to compute number of periodic payments. Parameters : rate : [scalar or (M, )array] Rate of interest as decimal (not per cent) per period pmt : [scalar or (M, )array] Payment value fv : [scalar or (M, )array] Future value pv : [scalar or (M, )array] present value when : at the beginning (when = {‘begin’, 1}) or the end (when = {‘end’, 0}) of each period. Default is {‘end’, 0}. Return : Number of periodic payments. Equation being solved : fv + pv*(1+rate)**nper + pmt*(1 + rate*when)/rate*((1 + rate)**nper - 1) == 0 or when rate == 0 fv + pv + pmt * nper == 0 Code: Python3 1== # Python program explaining # pmt() function import numpy as np ''' Question : how much time would it take to pay-off a loan of $10, 000 at 10 % annual rate of interest, if we had $100 to pay each month ? ''' # rate pmt pv Solution = np.nper(0.1 / 12, -100, 10000) # Here fv = 0 ; Also Default value of fv = 0 print("Solution - No. of periods : % f months" %(Solution)) Output: Solution - No. of periods : 215.905777 months Comment More infoAdvertise with us Next Article numpy.nper() in Python mohit gupta_omg :) Follow Improve Article Tags : Python Python-numpy Python numpy-Financial Functions Practice Tags : python Similar Reads numpy.nonzero() in Python numpy.nonzero()function is used to Compute the indices of the elements that are non-zero. It returns a tuple of arrays, one for each dimension of arr, containing the indices of the non-zero elements in that dimension. The corresponding non-zero values in the array can be obtained with arr[nonzero(ar 2 min read numpy.nanprod() in Python numpy.nanprod() function is used when we want to compute the product of array elements over a given axis treating NaNs as ones. One is returned for slices that are all-NaN or empty. Syntax : numpy.nanprod(arr, axis=None, dtype=None, out=None, keepdims='class numpy._globals._NoValue'). Parameters : a 2 min read numpy.isnan() in Python The numpy.isnan() function tests element-wise whether it is NaN or not and returns the result as a boolean array. Syntax : numpy.isnan(array [, out]) Parameters : array : [array_like]Input array or object whose elements, we need to test for infinity out : [ndarray, optional]Output array placed wit 2 min read numpy.any() in Python The numpy.any() function tests whether any array elements along the mentioned axis evaluate to True. Syntax : numpy.any(a, axis = None, out = None, keepdims = class numpy._globals._NoValue at 0x40ba726c) Parameters : array :[array_like]Input array or object whose elements, we need to test. axis : 3 min read numpy.nansum() in Python numpy.nansum()function is used when we want to compute the sum of array elements over a given axis treating Not a Numbers (NaNs) as zero. Syntax : numpy.nansum(arr, axis=None, dtype=None, out=None, keepdims='no value') Parameters : arr : [array_like] Array containing numbers whose sum is desired. If 3 min read numpy.nanmin() in Python numpy.nanmin()function is used when to returns minimum value of an array or along any specific mentioned axis of the array, ignoring any Nan value. Syntax : numpy.nanmin(arr, axis=None, out=None) Parameters : arr :Input array. axis :Axis along which we want the min value. Otherwise, it will consider 2 min read numpy.load() in Python numpy.load() function return the input array from a disk file with npy extension(.npy). Syntax : numpy.load(file, mmap_mode=None, allow_pickle=True, fix_imports=True, encoding='ASCII') Parameters: file : : file-like object, string, or pathlib.Path.The file to read. File-like objects must support the 2 min read Python | Numpy ndarray.__iand__() With the help of Numpy ndarray.__iand__() method, we can get the elements that is anded by the value that is provided as a parameter in numpy.ndarray.__iand__() method. Syntax: ndarray.__iand__($self, value, /) Return: self&=value Example #1 : In this example we can see that every element is and 1 min read numpy.nanargmin() in Python The numpy.nanargmin() function returns indices of the min element of the array in a particular axis ignoring NaNs. The results cannot be trusted if a slice contains only NaNs and Infs. Syntax:  numpy.nanargmin(array, axis = None) Parameters : array : Input array to work on axis : [int, optional]A 2 min read Python | Numpy ndarray.__ior__() With the help of Numpy ndarray.__ior__() method, we can get the elements that is OR by the value that is provided as a parameter in numpy.ndarray.__ior__() method. Syntax: ndarray.__ior__($self, value, /) Return: self|=value Example #1 : In this example we can see that every element is or by the val 1 min read Like