numpy.ma.append() function | Python Last Updated : 22 Apr, 2020 Comments Improve Suggest changes Like Article Like Report numpy.ma.append() function append the values to the end of an array. Syntax : numpy.ma.append(arr1, arr2, axis = None) Parameters : arr1 : [array_like] Values are appended to a copy of this array. arr2 : [array_like] Values are appended to a copy of this array. If axis is not specified, arr2 can be any shape and will be flattened before use. Otherwise, it must be of the correct shape. axis : [int, optional] The axis along which value are appended. Return : [MaskedArray] A copy of arr1 with arr2 appended to axis. If axis is None, the result is a flattened array. Code #1 : Python3 # Python program explaining # numpy.ma.append() function # importing numpy as geek # and numpy.ma module as ma import numpy as geek import numpy.ma as ma arr1 = ma.masked_values([1, 2, 3], 3) arr2 = ma.masked_values([[4, 5, 6], [7, 8, 9]], 8) gfg = ma.append(arr1, arr2) print (gfg) Output : [1 2 -- 4 5 6 7 -- 9] Code #2 : Python3 # Python program explaining # numpy.ma.append() function # importing numpy as geek # and numpy.ma module as ma import numpy as geek import numpy.ma as ma arr1 = ma.masked_values([1, 2, 3, 4], 2) arr2 = ma.masked_values([[5, 6, 7], [8, 9, 10]], 8) gfg = ma.append(arr1, arr2) print (gfg) Output : [1 -- 3 4 5 6 7 -- 9 10] Comment More infoAdvertise with us Next Article numpy.ma.append() function | Python sanjoy_62 Follow Improve Article Tags : Machine Learning Python-numpy python Python Numpy-Masked Array Practice Tags : Machine Learningpython Similar Reads numpy.append() in Python numpy.append() function is used to add new values at end of existing NumPy array. This is useful when we have to add more elements or rows in existing numpy array. It can also combine two arrays into a bigger one. Syntax: numpy.append(array, values, axis = None)array: Input array. values: The values 2 min read numpy.char.add() function in Python The add() method of the char class in the NumPy module is used for element-wise string concatenation for two arrays of str or unicode. numpy.char.add()Syntax : numpy.char.add(x1, x2)Parameters : x1 : first array to be concatenated (concatenated at the beginning)x2 : second array to be concatenated ( 1 min read numpy.concatenate() function | Python The numpy.concatenate() function combines multiple arrays into a single array along a specified axis. This function is particularly useful when working with large datasets or performing operations that require merging data from different sources. Unlike other array-joining functions like numpy.vstac 2 min read numpy.add() in Python NumPy, the Python powerhouse for scientific computing, provides an array of tools to efficiently manipulate and analyze data. Among its key functionalities lies numpy.add() a potent function that performs element-wise addition on NumPy arrays. numpy.add() SyntaxSyntax : numpy.add(arr1, arr2, /, out= 4 min read numpy.char.multiply() function in Python The multiply() method of the char class in the NumPy module is used for element-wise string multiple concatenation. numpy.char.multiply()Syntax : numpy.char.multiply(a, i)Parameters : a : array of str or unicodei : number of times to be repeatedReturns : Array of strings Example 1 : Using the method 1 min read numpy.defchararray.add() in Python numpy.core.defchararray.add(arr1, arr2): Concatenates two strings element-wise. Parameters: arr1 : array-like or string. arr2 : array-like or string. Returns : Concatenates String. Code #1: Python3 1== # Python Program illustrating # numpy.char.add() method import numpy as np arr1 = ['vdteteAAAa', ' 1 min read Python | Numpy numpy.ndarray.__add__() With the help of Numpy numpy.ndarray.__add__(), we can add a particular value that is provided as a parameter in the ndarray.__add__() method. Value will be added to each and every element in a numpy array. Syntax: ndarray.__add__($self, value, /) Return: self+value Example #1 : In this example we c 1 min read Python | Numpy MaskedArray.__add__ numpy.ma.MaskedArray class is a subclass of ndarray designed to manipulate numerical arrays with missing data. With the help of Numpy MaskedArray.__add__ we can add a particular value that is provided as a parameter in the MaskedArray.__add__() method. Value will be added to each and every element i 1 min read Python | Numpy numpy.ndarray.__iadd__() With the help of numpy.ndarray.__iadd__() method, we can add a particular value that is provided as a parameter in the ndarray.__iadd__() method. Value will be added to every element in a numpy array. Syntax: ndarray.__iadd__($self, value, /) Return: self+=value Example #1 : In this example we can s 1 min read Python | Numpy np.ma.concatenate() method With the help of np.ma.concatenate() method, we can concatenate two arrays with the help of np.ma.concatenate() method. Syntax : np.ma.concatenate([list1, list2]) Return : Return the array after concatenation. Example #1 : In this example we can see that by using np.ma.concatenate() method, we are a 1 min read Like