neulab/docprompting-conala huggingface dataset:
numpy.ma.MaskedArray.transpose method   ma.MaskedArray.transpose(*axes)[source]
 
Returns a view of the array with axes transposed. For a 1-D array this has no effect, as a transposed vector is simply the same vector. To convert a 1-D array into a 2D column vector, an additional dimension must be added. np.atleast2d(a).T achieves this, as does a[:, np.newaxis]. For a 2-D array, this is a standard matrix transpose. For an n-D array, if axes are given, their order indicates how the axes are permuted (see Examples). If axes are not provided and a.shape = (i[0], i[1], ... i[n-2], i[n-1]), then a.transpose().shape = (i[n-1], i[n-2], ... i[1], i[0]).  Parameters 
 
axesNone, tuple of ints, or n ints


 None or no argument: reverses the order of the axes. tuple of ints: i in the j-th place in the tuple means a’s i-th axis becomes a.transpose()’s j-th axis. 
n ints: same as an n-tuple of the same ints (this form is intended simply as a “convenience” alternative to the tuple form)     Returns 
 
outndarray


View of a, with axes suitably permuted.      See also  transpose

Equivalent function  ndarray.T

Array property returning the array transposed.  ndarray.reshape

Give a new shape to an array without changing its data.    Examples >>> a = np.array([[1, 2], [3, 4]])
>>> a
array([[1, 2],
       [3, 4]])
>>> a.transpose()
array([[1, 3],
       [2, 4]])
>>> a.transpose((1, 0))
array([[1, 3],
       [2, 4]])
>>> a.transpose(1, 0)
array([[1, 3],
       [2, 4]])
numpy.ma.MaskedArray.unshare_mask method   ma.MaskedArray.unshare_mask()[source]
 
Copy the mask and set the sharedmask flag to False. Whether the mask is shared between masked arrays can be seen from the sharedmask property. unshare_mask ensures the mask is not shared. A copy of the mask is only made if it was shared.  See also  sharedmask
numpy.ma.MaskedArray.view method   ma.MaskedArray.view(dtype=None, type=None, fill_value=None)[source]
 
Return a view of the MaskedArray data.  Parameters 
 
dtypedata-type or ndarray sub-class, optional


Data-type descriptor of the returned view, e.g., float32 or int16. The default, None, results in the view having the same data-type as a. As with ndarray.view, dtype can also be specified as an ndarray sub-class, which then specifies the type of the returned object (this is equivalent to setting the type parameter).  
typePython type, optional


Type of the returned view, either ndarray or a subclass. The default None results in type preservation.  
fill_valuescalar, optional


The value to use for invalid entries (None by default). If None, then this argument is inferred from the passed dtype, or in its absence the original array, as discussed in the notes below.      See also  numpy.ndarray.view

Equivalent method on ndarray object.    Notes a.view() is used two different ways: a.view(some_dtype) or a.view(dtype=some_dtype) constructs a view of the array’s memory with a different data-type. This can cause a reinterpretation of the bytes of memory. a.view(ndarray_subclass) or a.view(type=ndarray_subclass) just returns an instance of ndarray_subclass that looks at the same array (same shape, dtype, etc.) This does not cause a reinterpretation of the memory. If fill_value is not specified, but dtype is specified (and is not an ndarray sub-class), the fill_value of the MaskedArray will be reset. If neither fill_value nor dtype are specified (or if dtype is an ndarray sub-class), then the fill value is preserved. Finally, if fill_value is specified, but dtype is not, the fill value is set to the specified value. For a.view(some_dtype), if some_dtype has a different number of bytes per entry than the previous dtype (for example, converting a regular array to a structured array), then the behavior of the view cannot be predicted just from the superficial appearance of a (shown by print(a)). It also depends on exactly how a is stored in memory. Therefore if a is C-ordered versus fortran-ordered, versus defined as a slice or transpose, etc., the view may give different results.
numpy.ma.max   ma.max(obj, axis=None, out=None, fill_value=None, keepdims=<no value>)[source]
 
Return the maximum along a given axis.  Parameters 
 
axis{None, int}, optional


Axis along which to operate. By default, axis is None and the flattened input is used.  
outarray_like, optional


Alternative output array in which to place the result. Must be of the same shape and buffer length as the expected output.  
fill_valuescalar or None, optional


Value used to fill in the masked values. If None, use the output of maximum_fill_value().  
keepdimsbool, optional


If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the array.    Returns 
 
amaxarray_like


New array holding the result. If out was specified, out is returned.      See also  ma.maximum_fill_value

Returns the maximum filling value for a given datatype.
numpy.ma.maximum_fill_value   ma.maximum_fill_value(obj)[source]
 
Return the minimum value that can be represented by the dtype of an object. This function is useful for calculating a fill value suitable for taking the maximum of an array with a given dtype.  Parameters 
 
objndarray, dtype or scalar


An object that can be queried for it’s numeric type.    Returns 
 
valscalar


The minimum representable value.    Raises 
 TypeError

If obj isn’t a suitable numeric type.      See also  minimum_fill_value

The inverse function.  set_fill_value

Set the filling value of a masked array.  MaskedArray.fill_value

Return current fill value.    Examples >>> import numpy.ma as ma
>>> a = np.int8()
>>> ma.maximum_fill_value(a)
-128
>>> a = np.int32()
>>> ma.maximum_fill_value(a)
-2147483648
 An array of numeric data can also be passed. >>> a = np.array([1, 2, 3], dtype=np.int8)
>>> ma.maximum_fill_value(a)
-128
>>> a = np.array([1, 2, 3], dtype=np.float32)
>>> ma.maximum_fill_value(a)
-inf
numpy.ma.mean   ma.mean(self, axis=None, dtype=None, out=None, keepdims=<no value>) = <numpy.ma.core._frommethod object>
 
Returns the average of the array elements along given axis. Masked entries are ignored, and result elements which are not finite will be masked. Refer to numpy.mean for full documentation.  See also  numpy.ndarray.mean

corresponding function for ndarrays  numpy.mean

Equivalent function  numpy.ma.average

Weighted average.    Examples >>> a = np.ma.array([1,2,3], mask=[False, False, True])
>>> a
masked_array(data=[1, 2, --],
             mask=[False, False,  True],
       fill_value=999999)
>>> a.mean()
1.5
numpy.ma.median   ma.median(a, axis=None, out=None, overwrite_input=False, keepdims=False)[source]
 
Compute the median along the specified axis. Returns the median of the array elements.  Parameters 
 
aarray_like


Input array or object that can be converted to an array.  
axisint, optional


Axis along which the medians are computed. The default (None) is to compute the median along a flattened version of the array.  
outndarray, optional


Alternative output array in which to place the result. It must have the same shape and buffer length as the expected output but the type will be cast if necessary.  
overwrite_inputbool, optional


If True, then allow use of memory of input array (a) for calculations. The input array will be modified by the call to median. This will save memory when you do not need to preserve the contents of the input array. Treat the input as undefined, but it will probably be fully or partially sorted. Default is False. Note that, if overwrite_input is True, and the input is not already an ndarray, an error will be raised.  
keepdimsbool, optional


If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the input array.  New in version 1.10.0.     Returns 
 
medianndarray


A new array holding the result is returned unless out is specified, in which case a reference to out is returned. Return data-type is float64 for integers and floats smaller than float64, or the input data-type, otherwise.      See also  mean
  Notes Given a vector V with N non masked values, the median of V is the middle value of a sorted copy of V (Vs) - i.e. Vs[(N-1)/2], when N is odd, or {Vs[N/2 - 1] + Vs[N/2]}/2 when N is even. Examples >>> x = np.ma.array(np.arange(8), mask=[0]*4 + [1]*4)
>>> np.ma.median(x)
1.5
 >>> x = np.ma.array(np.arange(10).reshape(2, 5), mask=[0]*6 + [1]*4)
>>> np.ma.median(x)
2.5
>>> np.ma.median(x, axis=-1, overwrite_input=True)
masked_array(data=[2.0, 5.0],
             mask=[False, False],
       fill_value=1e+20)
numpy.ma.min   ma.min(obj, axis=None, out=None, fill_value=None, keepdims=<no value>)[source]
 
Return the minimum along a given axis.  Parameters 
 
axis{None, int}, optional


Axis along which to operate. By default, axis is None and the flattened input is used.  
outarray_like, optional


Alternative output array in which to place the result. Must be of the same shape and buffer length as the expected output.  
fill_valuescalar or None, optional


Value used to fill in the masked values. If None, use the output of minimum_fill_value.  
keepdimsbool, optional


If this is set to True, the axes which are reduced are left in the result as dimensions with size one. With this option, the result will broadcast correctly against the array.    Returns 
 
aminarray_like


New array holding the result. If out was specified, out is returned.      See also  ma.minimum_fill_value

Returns the minimum filling value for a given datatype.
numpy.ma.minimum_fill_value   ma.minimum_fill_value(obj)[source]
 
Return the maximum value that can be represented by the dtype of an object. This function is useful for calculating a fill value suitable for taking the minimum of an array with a given dtype.  Parameters 
 
objndarray, dtype or scalar


An object that can be queried for it’s numeric type.    Returns 
 
valscalar


The maximum representable value.    Raises 
 TypeError

If obj isn’t a suitable numeric type.      See also  maximum_fill_value

The inverse function.  set_fill_value

Set the filling value of a masked array.  MaskedArray.fill_value

Return current fill value.    Examples >>> import numpy.ma as ma
>>> a = np.int8()
>>> ma.minimum_fill_value(a)
127
>>> a = np.int32()
>>> ma.minimum_fill_value(a)
2147483647
 An array of numeric data can also be passed. >>> a = np.array([1, 2, 3], dtype=np.int8)
>>> ma.minimum_fill_value(a)
127
>>> a = np.array([1, 2, 3], dtype=np.float32)
>>> ma.minimum_fill_value(a)
inf
numpy.ma.mr_   ma.mr_ = <numpy.ma.extras.mr_class object>
 
Translate slice objects to concatenation along the first axis. This is the masked array version of lib.index_tricks.RClass.  See also  lib.index_tricks.RClass
  Examples >>> np.ma.mr_[np.ma.array([1,2,3]), 0, 0, np.ma.array([4,5,6])]
masked_array(data=[1, 2, 3, ..., 4, 5, 6],
             mask=False,
       fill_value=999999)
numpy.ma.nonzero   ma.nonzero(self) = <numpy.ma.core._frommethod object>
 
Return the indices of unmasked elements that are not zero. Returns a tuple of arrays, one for each dimension, containing the indices of the non-zero elements in that dimension. The corresponding non-zero values can be obtained with: a[a.nonzero()]
 To group the indices by element, rather than dimension, use instead: np.transpose(a.nonzero())
 The result of this is always a 2d array, with a row for each non-zero element.  Parameters 
 None
  Returns 
 
tuple_of_arraystuple


Indices of elements that are non-zero.      See also  numpy.nonzero

Function operating on ndarrays.  flatnonzero

Return indices that are non-zero in the flattened version of the input array.  numpy.ndarray.nonzero

Equivalent ndarray method.  count_nonzero

Counts the number of non-zero elements in the input array.    Examples >>> import numpy.ma as ma
>>> x = ma.array(np.eye(3))
>>> x
masked_array(
  data=[[1., 0., 0.],
        [0., 1., 0.],
        [0., 0., 1.]],
  mask=False,
  fill_value=1e+20)
>>> x.nonzero()
(array([0, 1, 2]), array([0, 1, 2]))
 Masked elements are ignored. >>> x[1, 1] = ma.masked
>>> x
masked_array(
  data=[[1.0, 0.0, 0.0],
        [0.0, --, 0.0],
        [0.0, 0.0, 1.0]],
  mask=[[False, False, False],
        [False,  True, False],
        [False, False, False]],
  fill_value=1e+20)
>>> x.nonzero()
(array([0, 2]), array([0, 2]))
 Indices can also be grouped by element. >>> np.transpose(x.nonzero())
array([[0, 0],
       [2, 2]])
 A common use for nonzero is to find the indices of an array, where a condition is True. Given an array a, the condition a > 3 is a boolean array and since False is interpreted as 0, ma.nonzero(a > 3) yields the indices of the a where the condition is true. >>> a = ma.array([[1,2,3],[4,5,6],[7,8,9]])
>>> a > 3
masked_array(
  data=[[False, False, False],
        [ True,  True,  True],
        [ True,  True,  True]],
  mask=False,
  fill_value=True)
>>> ma.nonzero(a > 3)
(array([1, 1, 1, 2, 2, 2]), array([0, 1, 2, 0, 1, 2]))
 The nonzero method of the condition array can also be called. >>> (a > 3).nonzero()
(array([1, 1, 1, 2, 2, 2]), array([0, 1, 2, 0, 1, 2]))
numpy.ma.notmasked_contiguous   ma.notmasked_contiguous(a, axis=None)[source]
 
Find contiguous unmasked data in a masked array along the given axis.  Parameters 
 
aarray_like


The input array.  
axisint, optional


Axis along which to perform the operation. If None (default), applies to a flattened version of the array, and this is the same as flatnotmasked_contiguous.    Returns 
 
endpointslist


A list of slices (start and end indexes) of unmasked indexes in the array. If the input is 2d and axis is specified, the result is a list of lists.      See also  
flatnotmasked_edges, flatnotmasked_contiguous, notmasked_edges


clump_masked, clump_unmasked

  Notes Only accepts 2-D arrays at most. Examples >>> a = np.arange(12).reshape((3, 4))
>>> mask = np.zeros_like(a)
>>> mask[1:, :-1] = 1; mask[0, 1] = 1; mask[-1, 0] = 0
>>> ma = np.ma.array(a, mask=mask)
>>> ma
masked_array(
  data=[[0, --, 2, 3],
        [--, --, --, 7],
        [8, --, --, 11]],
  mask=[[False,  True, False, False],
        [ True,  True,  True, False],
        [False,  True,  True, False]],
  fill_value=999999)
>>> np.array(ma[~ma.mask])
array([ 0,  2,  3,  7, 8, 11])
 >>> np.ma.notmasked_contiguous(ma)
[slice(0, 1, None), slice(2, 4, None), slice(7, 9, None), slice(11, 12, None)]
 >>> np.ma.notmasked_contiguous(ma, axis=0)
[[slice(0, 1, None), slice(2, 3, None)], [], [slice(0, 1, None)], [slice(0, 3, None)]]
 >>> np.ma.notmasked_contiguous(ma, axis=1)
[[slice(0, 1, None), slice(2, 4, None)], [slice(3, 4, None)], [slice(0, 1, None), slice(3, 4, None)]]
numpy.ma.notmasked_edges   ma.notmasked_edges(a, axis=None)[source]
 
Find the indices of the first and last unmasked values along an axis. If all values are masked, return None. Otherwise, return a list of two tuples, corresponding to the indices of the first and last unmasked values respectively.  Parameters 
 
aarray_like


The input array.  
axisint, optional


Axis along which to perform the operation. If None (default), applies to a flattened version of the array.    Returns 
 
edgesndarray or list


An array of start and end indexes if there are any masked data in the array. If there are no masked data in the array, edges is a list of the first and last index.      See also  
flatnotmasked_contiguous, flatnotmasked_edges, notmasked_contiguous


clump_masked, clump_unmasked

  Examples >>> a = np.arange(9).reshape((3, 3))
>>> m = np.zeros_like(a)
>>> m[1:, 1:] = 1
 >>> am = np.ma.array(a, mask=m)
>>> np.array(am[~am.mask])
array([0, 1, 2, 3, 6])
 >>> np.ma.notmasked_edges(am)
array([0, 6])
numpy.ma.ones   ma.ones(shape, dtype=None, order='C') = <numpy.ma.core._convert2ma object>
 
Return a new array of given shape and type, filled with ones.  Parameters 
 
shapeint or sequence of ints


Shape of the new array, e.g., (2, 3) or 2.  
dtypedata-type, optional


The desired data-type for the array, e.g., numpy.int8. Default is numpy.float64.  
order{‘C’, ‘F’}, optional, default: C


Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.  
likearray_like


Reference object to allow the creation of arrays which are not NumPy arrays. If an array-like passed in as like supports the __array_function__ protocol, the result will be defined by it. In this case, it ensures the creation of an array object compatible with that passed in via this argument.  New in version 1.20.0.     Returns 
 
outMaskedArray


Array of ones with the given shape, dtype, and order.      See also  ones_like

Return an array of ones with shape and type of input.  empty

Return a new uninitialized array.  zeros

Return a new array setting values to zero.  full

Return a new array of given shape filled with value.    Examples >>> np.ones(5)
array([1., 1., 1., 1., 1.])
 >>> np.ones((5,), dtype=int)
array([1, 1, 1, 1, 1])
 >>> np.ones((2, 1))
array([[1.],
       [1.]])
 >>> s = (2,2)
>>> np.ones(s)
array([[1.,  1.],
       [1.,  1.]])
numpy.ma.ones_like   ma.ones_like(*args, **kwargs) = <numpy.ma.core._convert2ma object>
 
Return an array of ones with the same shape and type as a given array.  Parameters 
 
aarray_like


The shape and data-type of a define these same attributes of the returned array.  
dtypedata-type, optional


Overrides the data type of the result.  New in version 1.6.0.   
order{‘C’, ‘F’, ‘A’, or ‘K’}, optional


Overrides the memory layout of the result. ‘C’ means C-order, ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous, ‘C’ otherwise. ‘K’ means match the layout of a as closely as possible.  New in version 1.6.0.   
subokbool, optional.


If True, then the newly created array will use the sub-class type of a, otherwise it will be a base-class array. Defaults to True.  
shapeint or sequence of ints, optional.


Overrides the shape of the result. If order=’K’ and the number of dimensions is unchanged, will try to keep order, otherwise, order=’C’ is implied.  New in version 1.17.0.     Returns 
 
outMaskedArray


Array of ones with the same shape and type as a.      See also  empty_like

Return an empty array with shape and type of input.  zeros_like

Return an array of zeros with shape and type of input.  full_like

Return a new array with shape of input filled with value.  ones

Return a new array setting values to one.    Examples >>> x = np.arange(6)
>>> x = x.reshape((2, 3))
>>> x
array([[0, 1, 2],
       [3, 4, 5]])
>>> np.ones_like(x)
array([[1, 1, 1],
       [1, 1, 1]])
 >>> y = np.arange(3, dtype=float)
>>> y
array([0., 1., 2.])
>>> np.ones_like(y)
array([1.,  1.,  1.])
numpy.ma.outer   ma.outer(a, b)[source]
 
Compute the outer product of two vectors. Given two vectors, a = [a0, a1, ..., aM] and b = [b0, b1, ..., bN], the outer product [1] is: [[a0*b0  a0*b1 ... a0*bN ]
 [a1*b0    .
 [ ...          .
 [aM*b0            aM*bN ]]
  Parameters 
 
a(M,) array_like


First input vector. Input is flattened if not already 1-dimensional.  
b(N,) array_like


Second input vector. Input is flattened if not already 1-dimensional.  
out(M, N) ndarray, optional


A location where the result is stored  New in version 1.9.0.     Returns 
 
out(M, N) ndarray


out[i, j] = a[i] * b[j]      See also  inner
einsum

einsum('i,j->ij', a.ravel(), b.ravel()) is the equivalent.  ufunc.outer

A generalization to dimensions other than 1D and other operations. np.multiply.outer(a.ravel(), b.ravel()) is the equivalent.  tensordot

np.tensordot(a.ravel(), b.ravel(), axes=((), ())) is the equivalent.    Notes Masked values are replaced by 0. References  1 
: G. H. Golub and C. F. Van Loan, Matrix Computations, 3rd ed., Baltimore, MD, Johns Hopkins University Press, 1996, pg. 8.   Examples Make a (very coarse) grid for computing a Mandelbrot set: >>> rl = np.outer(np.ones((5,)), np.linspace(-2, 2, 5))
>>> rl
array([[-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.]])
>>> im = np.outer(1j*np.linspace(2, -2, 5), np.ones((5,)))
>>> im
array([[0.+2.j, 0.+2.j, 0.+2.j, 0.+2.j, 0.+2.j],
       [0.+1.j, 0.+1.j, 0.+1.j, 0.+1.j, 0.+1.j],
       [0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j],
       [0.-1.j, 0.-1.j, 0.-1.j, 0.-1.j, 0.-1.j],
       [0.-2.j, 0.-2.j, 0.-2.j, 0.-2.j, 0.-2.j]])
>>> grid = rl + im
>>> grid
array([[-2.+2.j, -1.+2.j,  0.+2.j,  1.+2.j,  2.+2.j],
       [-2.+1.j, -1.+1.j,  0.+1.j,  1.+1.j,  2.+1.j],
       [-2.+0.j, -1.+0.j,  0.+0.j,  1.+0.j,  2.+0.j],
       [-2.-1.j, -1.-1.j,  0.-1.j,  1.-1.j,  2.-1.j],
       [-2.-2.j, -1.-2.j,  0.-2.j,  1.-2.j,  2.-2.j]])
 An example using a “vector” of letters: >>> x = np.array(['a', 'b', 'c'], dtype=object)
>>> np.outer(x, [1, 2, 3])
array([['a', 'aa', 'aaa'],
       ['b', 'bb', 'bbb'],
       ['c', 'cc', 'ccc']], dtype=object)
numpy.ma.outerproduct   ma.outerproduct(a, b)[source]
 
Compute the outer product of two vectors. Given two vectors, a = [a0, a1, ..., aM] and b = [b0, b1, ..., bN], the outer product [1] is: [[a0*b0  a0*b1 ... a0*bN ]
 [a1*b0    .
 [ ...          .
 [aM*b0            aM*bN ]]
  Parameters 
 
a(M,) array_like


First input vector. Input is flattened if not already 1-dimensional.  
b(N,) array_like


Second input vector. Input is flattened if not already 1-dimensional.  
out(M, N) ndarray, optional


A location where the result is stored  New in version 1.9.0.     Returns 
 
out(M, N) ndarray


out[i, j] = a[i] * b[j]      See also  inner
einsum

einsum('i,j->ij', a.ravel(), b.ravel()) is the equivalent.  ufunc.outer

A generalization to dimensions other than 1D and other operations. np.multiply.outer(a.ravel(), b.ravel()) is the equivalent.  tensordot

np.tensordot(a.ravel(), b.ravel(), axes=((), ())) is the equivalent.    Notes Masked values are replaced by 0. References  1 
: G. H. Golub and C. F. Van Loan, Matrix Computations, 3rd ed., Baltimore, MD, Johns Hopkins University Press, 1996, pg. 8.   Examples Make a (very coarse) grid for computing a Mandelbrot set: >>> rl = np.outer(np.ones((5,)), np.linspace(-2, 2, 5))
>>> rl
array([[-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.],
       [-2., -1.,  0.,  1.,  2.]])
>>> im = np.outer(1j*np.linspace(2, -2, 5), np.ones((5,)))
>>> im
array([[0.+2.j, 0.+2.j, 0.+2.j, 0.+2.j, 0.+2.j],
       [0.+1.j, 0.+1.j, 0.+1.j, 0.+1.j, 0.+1.j],
       [0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j, 0.+0.j],
       [0.-1.j, 0.-1.j, 0.-1.j, 0.-1.j, 0.-1.j],
       [0.-2.j, 0.-2.j, 0.-2.j, 0.-2.j, 0.-2.j]])
>>> grid = rl + im
>>> grid
array([[-2.+2.j, -1.+2.j,  0.+2.j,  1.+2.j,  2.+2.j],
       [-2.+1.j, -1.+1.j,  0.+1.j,  1.+1.j,  2.+1.j],
       [-2.+0.j, -1.+0.j,  0.+0.j,  1.+0.j,  2.+0.j],
       [-2.-1.j, -1.-1.j,  0.-1.j,  1.-1.j,  2.-1.j],
       [-2.-2.j, -1.-2.j,  0.-2.j,  1.-2.j,  2.-2.j]])
 An example using a “vector” of letters: >>> x = np.array(['a', 'b', 'c'], dtype=object)
>>> np.outer(x, [1, 2, 3])
array([['a', 'aa', 'aaa'],
       ['b', 'bb', 'bbb'],
       ['c', 'cc', 'ccc']], dtype=object)
numpy.ma.power   ma.power(a, b, third=None)[source]
 
Returns element-wise base array raised to power from second array. This is the masked array version of numpy.power. For details see numpy.power.  See also  numpy.power
  Notes The out argument to numpy.power is not supported, third has to be None.
numpy.ma.prod   ma.prod(self, axis=None, dtype=None, out=None, keepdims=<no value>) = <numpy.ma.core._frommethod object>
 
Return the product of the array elements over the given axis. Masked elements are set to 1 internally for computation. Refer to numpy.prod for full documentation.  See also  numpy.ndarray.prod

corresponding function for ndarrays  numpy.prod

equivalent function    Notes Arithmetic is modular when using integer types, and no error is raised on overflow.