numpy.nextafter() in Python Last Updated : 09 Aug, 2022 Comments Improve Suggest changes Like Article Like Report numpy.nextafter(arr1, arr2, out = None, where = True, casting = ‘same_kind’, order = ‘K’, dtype = None) : This mathematical function helps user to return next floating-point value after arr1 towards arr2, element-wise. Parameters : arr1 : [array_like]Input array, values to find next value of. arr2 : [array_like]Input array, values in which direction to look for. out : [ndarray, optional]Output array with same dimensions as Input array, placed with result. **kwargs : Allows you to pass keyword variable length of argument to a function. It is used when we want to handle named argument in a function. where : [array_like, optional]True value means to calculate the universal functions(ufunc) at that position, False value means to leave the value in the output alone. Return : next floating-point value of arr1 in the direction of arr2. Code : Python3 # Python program illustrating # nextafter() method import numpy as np arr1 = 3 arr2 = 4 print ("arr1 : ", arr1) print ("arr2 : ", arr2) print ("\nCheck sign of arr1 : ", np.nextafter(arr1, arr2)) Output : arr1 : 3 arr2 : 4 Check sign of arr1 : 3.0000000000000004 Comment More infoAdvertise with us Next Article numpy.nextafter() in Python M mohit gupta_omg :) Follow Improve Article Tags : Python Python-numpy Python numpy-Mathematical Function Practice Tags : python Similar Reads Indentation in Python In Python, indentation is used to define blocks of code. It tells the Python interpreter that a group of statements belongs to a specific block. All statements with the same level of indentation are considered part of the same block. Indentation is achieved using whitespace (spaces or tabs) at the b 2 min read Python math function - nextafter() math.nextafter() is a function introduced in python 3.9.0. nextafter(x,y) returns the next float value after x towards y, if x is equal to y then y is returned. Syntax: math.nextafter(x, y) Parameter: x and y are two integers/floating point values. Returns: Return the next floating-point value after 1 min read anext() in Python anext() is a built-in function that retrieves the next item from an asynchronous iterator, acting as the async version of next(). It is essential when working with async iterators and generators, offering more flexibility in asynchronous workflows. Note: anext() is available starting in Python 3.10. 3 min read SymPy | Prufer.next() in Python Prufer.next() : next() is a sympy Python library function that returns the Prufer sequence that is delta beyond the current one. Syntax : sympy.combinatorics.Prufer.prufer.next() Return : Prufer sequence that is delta beyond the current one Code #1 : next() Example Python3 1=1 # Python code explaini 1 min read Iterators in Python An iterator in Python is an object that holds a sequence of values and provide sequential traversal through a collection of items such as lists, tuples and dictionaries. . The Python iterators object is initialized using the iter() method. It uses the next() method for iteration.__iter__(): __iter__ 3 min read Like