Numpy MaskedArray.conjugate() function | Python Last Updated : 14 Aug, 2024 Comments Improve Suggest changes Like Article Like Report numpy.MaskedArray.conjugate() function is used to return the complex conjugate, element-wise.The conjugate of a complex number is obtained by changing the sign of its imaginary part. Syntax : numpy.ma.conjugate(arr, out=None, where=True, casting='same_kind', order='K', dtype=None, subok=True)Parameters:arr :[ array_like] Input masked array which we want to conjugate. out : [ndarray, optional] A location into which the result is stored. -> If provided, it must have a shape that the inputs broadcast to. -> If not provided or None, a freshly-allocated array is returned. where : [array_like, optional] Values of True indicate to calculate the ufunc at that position, values of False indicate to leave the value in the output alone. casting :[ ‘no’, ‘equiv’, ‘safe’, ‘same_kind’, or ‘unsafe’] Provides a policy for what kind of casting is permitted. order : The elements of a are read using this index order. dtype :[dtype, optional] Type of the returned array, as well as of the accumulator in which the elements are multiplied. subok : Defaults to true. If set to false, the output will always be a strict array, not a subtype. Return : [ ndarray] The complex conjugate of arr. Code #1 : Python # Python program explaining # numpy.MaskedArray.conjugate() method # importing numpy as geek # and numpy.ma module as ma import numpy as geek import numpy.ma as ma # creating input array in_arr = geek.array([[1 + 2j, 2 + 3j], [ 3-2j, -1 + 2j], [ 5-4j, -3-3j]]) print ("Input array : ", in_arr) # Now we are creating a masked array. # by making two entry as invalid. mask_arr = ma.masked_array(in_arr, mask =[[1, 0], [ 1, 0], [ 0, 0]]) print ("Masked array : ", mask_arr) # applying MaskedArray.conjugate # methods to masked array out_arr = ma.conjugate(mask_arr) print ("conjugate of masked array : ", out_arr) OutputInput array : [[ 1.+2.j 2.+3.j] [ 3.-2.j -1.+2.j] [ 5.-4.j -3.-3.j]] Masked array : [[-- (2+3j)] [-- (-1+2j)] [(5-4j) (-3-3j)]] conjugate of masked array : [[-- (2-3j)] [-- (-1-2j)] [(5+4j) (-3+3j)] Comment More infoAdvertise with us Next Article Numpy MaskedArray.conjugate() function | Python jana_sayantan Follow Improve Article Tags : Python Python-numpy Python numpy-arrayManipulation Practice Tags : python Similar Reads Numpy MaskedArray.dot() function | Python numpy.MaskedArray.dot() function is used to calculate the dot product of two mask arrays. Syntax : numpy.ma.dot(arr1, arr2, strict=False) Parameters: arr1, arr2:[ ndarray] Inputs arrays. strict : [bool, optional] Whether masked data are propagated (True) or set to 0 (False) for the computation. Defa 3 min read Numpy MaskedArray.astype() function | Python In many circumstances, datasets can be incomplete or tainted by the presence of invalid data. For example, a sensor may have failed to record a data, or recorded an invalid value. The numpy.ma module provides a convenient way to address this issue, by introducing masked arrays.Masked arrays are arra 2 min read numpy.ma.MaskedArray.count() function - Python numpy.ma.MaskedArray.count() function count the non-masked elements of the array along the given axis. Syntax : numpy.ma.MaskedArray.count(self, axis=None, keepdims = no value) Parameters : axis : [None or int or tuple of ints, optional] Axis along which the count is performed. The default axis is N 2 min read Numpy MaskedArray.flatten() function | Python numpy.MaskedArray.flatten() function is used to return a copy of the input masked array collapsed into one dimension. Syntax : numpy.ma.flatten(order='C') Parameters: order : [âCâ, âFâ, âAâ, âKâ, optional] Whether to flatten in C (row-major), Fortran (column-major) order, or preserve the C/Fortran o 2 min read Numpy MaskedArray.all() function | Python In many circumstances, datasets can be incomplete or tainted by the presence of invalid data. For example, a sensor may have failed to record a data, or recorded an invalid value. The numpy.ma module provides a convenient way to address this issue, by introducing masked arrays. Masked arrays are arr 3 min read Numpy MaskedArray.any() function | Python In many circumstances, datasets can be incomplete or tainted by the presence of invalid data. For example, a sensor may have failed to record a data, or recorded an invalid value. The numpy.ma module provides a convenient way to address this issue, by introducing masked arrays.Masked arrays are arra 3 min read Numpy MaskedArray.argmax() function | Python In many circumstances, datasets can be incomplete or tainted by the presence of invalid data. For example, a sensor may have failed to record a data, or recorded an invalid value. The numpy.ma module provides a convenient way to address this issue, by introducing masked arrays.Masked arrays are arra 3 min read Numpy MaskedArray.cumsum() function | Python numpy.MaskedArray.cumsum() Return the cumulative sum of the masked array elements over the given axis.Masked values are set to 0 internally during the computation. However, their position is saved, and the result will be masked at the same locations. Syntax : numpy.ma.cumsum(axis=None, dtype=None, o 3 min read Numpy MaskedArray.cumprod() function | Python numpy.MaskedArray.cumprod() Return the cumulative product of the masked array elements over the given axis.Masked values are set to 1 internally during the computation. However, their position is saved, and the result will be masked at the same locations. Syntax : numpy.ma.cumprod(axis=None, dtype=N 3 min read Numpy MaskedArray.anom() function | Python In many circumstances, datasets can be incomplete or tainted by the presence of invalid data. For example, a sensor may have failed to record a data, or recorded an invalid value. The numpy.ma module provides a convenient way to address this issue, by introducing masked arrays.Masked arrays are arra 2 min read Like