neulab/docprompting-conala huggingface dataset:
make_svn_version_py(delete=True)[source]
 
Appends a data function to the data_files list that will generate __svn_version__.py file to the current package directory. Generate package __svn_version__.py file from SVN revision number, it will be removed after python exits but will be available when sdist, etc commands are executed. Notes If __svn_version__.py existed before, nothing is done. This is intended for working with source directories that are in an SVN repository.
Constants of the numpy.ma module In addition to the MaskedArray class, the numpy.ma module defines several constants.   numpy.ma.masked
 
The masked constant is a special case of MaskedArray, with a float datatype and a null shape. It is used to test whether a specific entry of a masked array is masked, or to mask one or several entries of a masked array: >>> x = ma.array([1, 2, 3], mask=[0, 1, 0])
>>> x[1] is ma.masked
True
>>> x[-1] = ma.masked
>>> x
masked_array(data=[1, --, --],
             mask=[False,  True,  True],
       fill_value=999999)
 
   numpy.ma.nomask
 
Value indicating that a masked array has no invalid entry. nomask is used internally to speed up computations when the mask is not needed. It is represented internally as np.False_. 
   numpy.ma.masked_print_options
 
String used in lieu of missing data when a masked array is printed. By default, this string is '--'.
numpy.matlib.empty   matlib.empty(shape, dtype=None, order='C')[source]
 
Return a new matrix of given shape and type, without initializing entries.  Parameters 
 
shapeint or tuple of int


Shape of the empty matrix.  
dtypedata-type, optional


Desired output data-type.  
order{‘C’, ‘F’}, optional


Whether to store multi-dimensional data in row-major (C-style) or column-major (Fortran-style) order in memory.      See also  
empty_like, zeros

  Notes empty, unlike zeros, does not set the matrix values to zero, and may therefore be marginally faster. On the other hand, it requires the user to manually set all the values in the array, and should be used with caution. Examples >>> import numpy.matlib
>>> np.matlib.empty((2, 2))    # filled with random data
matrix([[  6.76425276e-320,   9.79033856e-307], # random
        [  7.39337286e-309,   3.22135945e-309]])
>>> np.matlib.empty((2, 2), dtype=int)
matrix([[ 6600475,        0], # random
        [ 6586976, 22740995]])
numpy.matlib.eye   matlib.eye(n, M=None, k=0, dtype=<class 'float'>, order='C')[source]
 
Return a matrix with ones on the diagonal and zeros elsewhere.  Parameters 
 
nint


Number of rows in the output.  
Mint, optional


Number of columns in the output, defaults to n.  
kint, optional


Index of the diagonal: 0 refers to the main diagonal, a positive value refers to an upper diagonal, and a negative value to a lower diagonal.  
dtypedtype, optional


Data-type of the returned matrix.  
order{‘C’, ‘F’}, optional


Whether the output should be stored in row-major (C-style) or column-major (Fortran-style) order in memory.  New in version 1.14.0.     Returns 
 
Imatrix


A n x M matrix where all elements are equal to zero, except for the k-th diagonal, whose values are equal to one.      See also  numpy.eye

Equivalent array function.  identity

Square identity matrix.    Examples >>> import numpy.matlib
>>> np.matlib.eye(3, k=1, dtype=float)
matrix([[0.,  1.,  0.],
        [0.,  0.,  1.],
        [0.,  0.,  0.]])
numpy.matlib.identity   matlib.identity(n, dtype=None)[source]
 
Returns the square identity matrix of given size.  Parameters 
 
nint


Size of the returned identity matrix.  
dtypedata-type, optional


Data-type of the output. Defaults to float.    Returns 
 
outmatrix


n x n matrix with its main diagonal set to one, and all other elements zero.      See also  numpy.identity

Equivalent array function.  matlib.eye

More general matrix identity function.    Examples >>> import numpy.matlib
>>> np.matlib.identity(3, dtype=int)
matrix([[1, 0, 0],
        [0, 1, 0],
        [0, 0, 1]])
numpy.matlib.ones   matlib.ones(shape, dtype=None, order='C')[source]
 
Matrix of ones. Return a matrix of given shape and type, filled with ones.  Parameters 
 
shape{sequence of ints, int}


Shape of the matrix  
dtypedata-type, optional


The desired data-type for the matrix, default is np.float64.  
order{‘C’, ‘F’}, optional


Whether to store matrix in C- or Fortran-contiguous order, default is ‘C’.    Returns 
 
outmatrix


Matrix of ones of given shape, dtype, and order.      See also  ones

Array of ones.  matlib.zeros

Zero matrix.    Notes If shape has length one i.e. (N,), or is a scalar N, out becomes a single row matrix of shape (1,N). Examples >>> np.matlib.ones((2,3))
matrix([[1.,  1.,  1.],
        [1.,  1.,  1.]])
 >>> np.matlib.ones(2)
matrix([[1.,  1.]])
numpy.matlib.rand   matlib.rand(*args)[source]
 
Return a matrix of random values with given shape. Create a matrix of the given shape and propagate it with random samples from a uniform distribution over [0, 1).  Parameters 
 
*argsArguments


Shape of the output. If given as N integers, each integer specifies the size of one dimension. If given as a tuple, this tuple gives the complete shape.    Returns 
 
outndarray


The matrix of random values with shape given by *args.      See also  
randn, numpy.random.RandomState.rand

  Examples >>> np.random.seed(123)
>>> import numpy.matlib
>>> np.matlib.rand(2, 3)
matrix([[0.69646919, 0.28613933, 0.22685145],
        [0.55131477, 0.71946897, 0.42310646]])
>>> np.matlib.rand((2, 3))
matrix([[0.9807642 , 0.68482974, 0.4809319 ],
        [0.39211752, 0.34317802, 0.72904971]])
 If the first argument is a tuple, other arguments are ignored: >>> np.matlib.rand((2, 3), 4)
matrix([[0.43857224, 0.0596779 , 0.39804426],
        [0.73799541, 0.18249173, 0.17545176]])
numpy.matlib.randn   matlib.randn(*args)[source]
 
Return a random matrix with data from the “standard normal” distribution. randn generates a matrix filled with random floats sampled from a univariate “normal” (Gaussian) distribution of mean 0 and variance 1.  Parameters 
 
*argsArguments


Shape of the output. If given as N integers, each integer specifies the size of one dimension. If given as a tuple, this tuple gives the complete shape.    Returns 
 
Zmatrix of floats


A matrix of floating-point samples drawn from the standard normal distribution.      See also  
rand, numpy.random.RandomState.randn

  Notes For random samples from \(N(\mu, \sigma^2)\), use: sigma * np.matlib.randn(...) + mu Examples >>> np.random.seed(123)
>>> import numpy.matlib
>>> np.matlib.randn(1)
matrix([[-1.0856306]])
>>> np.matlib.randn(1, 2, 3)
matrix([[ 0.99734545,  0.2829785 , -1.50629471],
        [-0.57860025,  1.65143654, -2.42667924]])
 Two-by-four matrix of samples from \(N(3, 6.25)\): >>> 2.5 * np.matlib.randn((2, 4)) + 3
matrix([[1.92771843, 6.16484065, 0.83314899, 1.30278462],
        [2.76322758, 6.72847407, 1.40274501, 1.8900451 ]])
numpy.matlib.repmat   matlib.repmat(a, m, n)[source]
 
Repeat a 0-D to 2-D array or matrix MxN times.  Parameters 
 
aarray_like


The array or matrix to be repeated.  
m, nint


The number of times a is repeated along the first and second axes.    Returns 
 
outndarray


The result of repeating a.     Examples >>> import numpy.matlib
>>> a0 = np.array(1)
>>> np.matlib.repmat(a0, 2, 3)
array([[1, 1, 1],
       [1, 1, 1]])
 >>> a1 = np.arange(4)
>>> np.matlib.repmat(a1, 2, 2)
array([[0, 1, 2, 3, 0, 1, 2, 3],
       [0, 1, 2, 3, 0, 1, 2, 3]])
 >>> a2 = np.asmatrix(np.arange(6).reshape(2, 3))
>>> np.matlib.repmat(a2, 2, 3)
matrix([[0, 1, 2, 0, 1, 2, 0, 1, 2],
        [3, 4, 5, 3, 4, 5, 3, 4, 5],
        [0, 1, 2, 0, 1, 2, 0, 1, 2],
        [3, 4, 5, 3, 4, 5, 3, 4, 5]])
numpy.matlib.zeros   matlib.zeros(shape, dtype=None, order='C')[source]
 
Return a matrix of given shape and type, filled with zeros.  Parameters 
 
shapeint or sequence of ints


Shape of the matrix  
dtypedata-type, optional


The desired data-type for the matrix, default is float.  
order{‘C’, ‘F’}, optional


Whether to store the result in C- or Fortran-contiguous order, default is ‘C’.    Returns 
 
outmatrix


Zero matrix of given shape, dtype, and order.      See also  numpy.zeros

Equivalent array function.  matlib.ones

Return a matrix of ones.    Notes If shape has length one i.e. (N,), or is a scalar N, out becomes a single row matrix of shape (1,N). Examples >>> import numpy.matlib
>>> np.matlib.zeros((2, 3))
matrix([[0.,  0.,  0.],
        [0.,  0.,  0.]])
 >>> np.matlib.zeros(2)
matrix([[0.,  0.]])
numpy.matrix.all method   matrix.all(axis=None, out=None)[source]
 
Test whether all matrix elements along a given axis evaluate to True.  Parameters 
 See `numpy.all` for complete descriptions
    See also  numpy.all
  Notes This is the same as ndarray.all, but it returns a matrix object. Examples >>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> y = x[0]; y
matrix([[0, 1, 2, 3]])
>>> (x == y)
matrix([[ True,  True,  True,  True],
        [False, False, False, False],
        [False, False, False, False]])
>>> (x == y).all()
False
>>> (x == y).all(0)
matrix([[False, False, False, False]])
>>> (x == y).all(1)
matrix([[ True],
        [False],
        [False]])
numpy.matrix.any method   matrix.any(axis=None, out=None)[source]
 
Test whether any array element along a given axis evaluates to True. Refer to numpy.any for full documentation.  Parameters 
 
axisint, optional


Axis along which logical OR is performed  
outndarray, optional


Output to existing array instead of creating new one, must have same shape as expected output    Returns 
 
anybool, ndarray


Returns a single bool if axis is None; otherwise, returns ndarray
numpy.matrix.argmax method   matrix.argmax(axis=None, out=None)[source]
 
Indexes of the maximum values along an axis. Return the indexes of the first occurrences of the maximum values along the specified axis. If axis is None, the index is for the flattened matrix.  Parameters 
 See `numpy.argmax` for complete descriptions
    See also  numpy.argmax
  Notes This is the same as ndarray.argmax, but returns a matrix object where ndarray.argmax would return an ndarray. Examples >>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.argmax()
11
>>> x.argmax(0)
matrix([[2, 2, 2, 2]])
>>> x.argmax(1)
matrix([[3],
        [3],
        [3]])
numpy.matrix.argmin method   matrix.argmin(axis=None, out=None)[source]
 
Indexes of the minimum values along an axis. Return the indexes of the first occurrences of the minimum values along the specified axis. If axis is None, the index is for the flattened matrix.  Parameters 
 See `numpy.argmin` for complete descriptions.
    See also  numpy.argmin
  Notes This is the same as ndarray.argmin, but returns a matrix object where ndarray.argmin would return an ndarray. Examples >>> x = -np.matrix(np.arange(12).reshape((3,4))); x
matrix([[  0,  -1,  -2,  -3],
        [ -4,  -5,  -6,  -7],
        [ -8,  -9, -10, -11]])
>>> x.argmin()
11
>>> x.argmin(0)
matrix([[2, 2, 2, 2]])
>>> x.argmin(1)
matrix([[3],
        [3],
        [3]])
numpy.matrix.argpartition method   matrix.argpartition(kth, axis=- 1, kind='introselect', order=None)
 
Returns the indices that would partition this array. Refer to numpy.argpartition for full documentation.  New in version 1.8.0.   See also  numpy.argpartition

equivalent function
numpy.matrix.argsort method   matrix.argsort(axis=- 1, kind=None, order=None)
 
Returns the indices that would sort this array. Refer to numpy.argsort for full documentation.  See also  numpy.argsort

equivalent function
numpy.matrix.astype method   matrix.astype(dtype, order='K', casting='unsafe', subok=True, copy=True)
 
Copy of the array, cast to a specified type.  Parameters 
 
dtypestr or dtype


Typecode or data-type to which the array is cast.  
order{‘C’, ‘F’, ‘A’, ‘K’}, optional


Controls the memory layout order of the result. ‘C’ means C order, ‘F’ means Fortran order, ‘A’ means ‘F’ order if all the arrays are Fortran contiguous, ‘C’ order otherwise, and ‘K’ means as close to the order the array elements appear in memory as possible. Default is ‘K’.  
casting{‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’}, optional


Controls what kind of data casting may occur. Defaults to ‘unsafe’ for backwards compatibility.  ‘no’ means the data types should not be cast at all. ‘equiv’ means only byte-order changes are allowed. ‘safe’ means only casts which can preserve values are allowed. ‘same_kind’ means only safe casts or casts within a kind, like float64 to float32, are allowed. ‘unsafe’ means any data conversions may be done.   
subokbool, optional


If True, then sub-classes will be passed-through (default), otherwise the returned array will be forced to be a base-class array.  
copybool, optional


By default, astype always returns a newly allocated array. If this is set to false, and the dtype, order, and subok requirements are satisfied, the input array is returned instead of a copy.    Returns 
 
arr_tndarray


Unless copy is False and the other conditions for returning the input array are satisfied (see description for copy input parameter), arr_t is a new array of the same shape as the input array, with dtype, order given by dtype, order.    Raises 
 ComplexWarning

When casting from complex to float or int. To avoid this, one should use a.real.astype(t).     Notes  Changed in version 1.17.0: Casting between a simple data type and a structured one is possible only for “unsafe” casting. Casting to multiple fields is allowed, but casting from multiple fields is not.   Changed in version 1.9.0: Casting from numeric to string types in ‘safe’ casting mode requires that the string dtype length is long enough to store the max integer/float value converted.  Examples >>> x = np.array([1, 2, 2.5])
>>> x
array([1. ,  2. ,  2.5])
 >>> x.astype(int)
array([1, 2, 2])
numpy.matrix.base attribute   matrix.base
 
Base object if memory is from some other object. Examples The base of an array that owns its memory is None: >>> x = np.array([1,2,3,4])
>>> x.base is None
True
 Slicing creates a view, whose memory is shared with x: >>> y = x[2:]
>>> y.base is x
True
numpy.matrix.byteswap method   matrix.byteswap(inplace=False)
 
Swap the bytes of the array elements Toggle between low-endian and big-endian data representation by returning a byteswapped array, optionally swapped in-place. Arrays of byte-strings are not swapped. The real and imaginary parts of a complex number are swapped individually.  Parameters 
 
inplacebool, optional


If True, swap bytes in-place, default is False.    Returns 
 
outndarray


The byteswapped array. If inplace is True, this is a view to self.     Examples >>> A = np.array([1, 256, 8755], dtype=np.int16)
>>> list(map(hex, A))
['0x1', '0x100', '0x2233']
>>> A.byteswap(inplace=True)
array([  256,     1, 13090], dtype=int16)
>>> list(map(hex, A))
['0x100', '0x1', '0x3322']
 Arrays of byte-strings are not swapped >>> A = np.array([b'ceg', b'fac'])
>>> A.byteswap()
array([b'ceg', b'fac'], dtype='|S3')
  
A.newbyteorder().byteswap() produces an array with the same values

but different representation in memory   >>> A = np.array([1, 2, 3])
>>> A.view(np.uint8)
array([1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0,
       0, 0], dtype=uint8)
>>> A.newbyteorder().byteswap(inplace=True)
array([1, 2, 3])
>>> A.view(np.uint8)
array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,
       0, 3], dtype=uint8)
numpy.matrix.choose method   matrix.choose(choices, out=None, mode='raise')
 
Use an index array to construct a new array from a set of choices. Refer to numpy.choose for full documentation.  See also  numpy.choose

equivalent function
numpy.matrix.clip method   matrix.clip(min=None, max=None, out=None, **kwargs)
 
Return an array whose values are limited to [min, max]. One of max or min must be given. Refer to numpy.clip for full documentation.  See also  numpy.clip

equivalent function
numpy.matrix.compress method   matrix.compress(condition, axis=None, out=None)
 
Return selected slices of this array along given axis. Refer to numpy.compress for full documentation.  See also  numpy.compress

equivalent function
numpy.matrix.conj method   matrix.conj()
 
Complex-conjugate all elements. Refer to numpy.conjugate for full documentation.  See also  numpy.conjugate

equivalent function
numpy.matrix.conjugate method   matrix.conjugate()
 
Return the complex conjugate, element-wise. Refer to numpy.conjugate for full documentation.  See also  numpy.conjugate

equivalent function
numpy.matrix.copy method   matrix.copy(order='C')
 
Return a copy of the array.  Parameters 
 
order{‘C’, ‘F’, ‘A’, ‘K’}, optional


Controls the memory layout of the copy. ‘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. (Note that this function and numpy.copy are very similar but have different default values for their order= arguments, and this function always passes sub-classes through.)      See also  numpy.copy

Similar function with different default behavior  numpy.copyto
  Notes This function is the preferred method for creating an array copy. The function numpy.copy is similar, but it defaults to using order ‘K’, and will not pass sub-classes through by default. Examples >>> x = np.array([[1,2,3],[4,5,6]], order='F')
 >>> y = x.copy()
 >>> x.fill(0)
 >>> x
array([[0, 0, 0],
       [0, 0, 0]])
 >>> y
array([[1, 2, 3],
       [4, 5, 6]])
 >>> y.flags['C_CONTIGUOUS']
True
numpy.matrix.cumprod method   matrix.cumprod(axis=None, dtype=None, out=None)
 
Return the cumulative product of the elements along the given axis. Refer to numpy.cumprod for full documentation.  See also  numpy.cumprod

equivalent function
numpy.matrix.cumsum method   matrix.cumsum(axis=None, dtype=None, out=None)
 
Return the cumulative sum of the elements along the given axis. Refer to numpy.cumsum for full documentation.  See also  numpy.cumsum

equivalent function
numpy.matrix.data attribute   matrix.data
 
Python buffer object pointing to the start of the array’s data.
numpy.matrix.diagonal method   matrix.diagonal(offset=0, axis1=0, axis2=1)
 
Return specified diagonals. In NumPy 1.9 the returned array is a read-only view instead of a copy as in previous NumPy versions. In a future version the read-only restriction will be removed. Refer to numpy.diagonal for full documentation.  See also  numpy.diagonal

equivalent function
numpy.matrix.dump method   matrix.dump(file)
 
Dump a pickle of the array to the specified file. The array can be read back with pickle.load or numpy.load.  Parameters 
 
filestr or Path


A string naming the dump file.  Changed in version 1.17.0: pathlib.Path objects are now accepted.
numpy.matrix.dumps method   matrix.dumps()
 
Returns the pickle of the array as a string. pickle.loads will convert the string back to an array.  Parameters 
 None
numpy.matrix.fill method   matrix.fill(value)
 
Fill the array with a scalar value.  Parameters 
 
valuescalar


All elements of a will be assigned this value.     Examples >>> a = np.array([1, 2])
>>> a.fill(0)
>>> a
array([0, 0])
>>> a = np.empty(2)
>>> a.fill(1)
>>> a
array([1.,  1.])
numpy.matrix.flags attribute   matrix.flags
 
Information about the memory layout of the array. Notes The flags object can be accessed dictionary-like (as in a.flags['WRITEABLE']), or by using lowercased attribute names (as in a.flags.writeable). Short flag names are only supported in dictionary access. Only the WRITEBACKIFCOPY, UPDATEIFCOPY, WRITEABLE, and ALIGNED flags can be changed by the user, via direct assignment to the attribute or dictionary entry, or by calling ndarray.setflags. The array flags cannot be set arbitrarily:  UPDATEIFCOPY can only be set False. WRITEBACKIFCOPY can only be set False. ALIGNED can only be set True if the data is truly aligned. WRITEABLE can only be set True if the array owns its own memory or the ultimate owner of the memory exposes a writeable buffer interface or is a string.  Arrays can be both C-style and Fortran-style contiguous simultaneously. This is clear for 1-dimensional arrays, but can also be true for higher dimensional arrays. Even for contiguous arrays a stride for a given dimension arr.strides[dim] may be arbitrary if arr.shape[dim] == 1 or the array has no elements. It does not generally hold that self.strides[-1] == self.itemsize for C-style contiguous arrays or self.strides[0] == self.itemsize for Fortran-style contiguous arrays is true.  Attributes 
 C_CONTIGUOUS (C)

The data is in a single, C-style contiguous segment.  F_CONTIGUOUS (F)

The data is in a single, Fortran-style contiguous segment.  OWNDATA (O)

The array owns the memory it uses or borrows it from another object.  WRITEABLE (W)

The data area can be written to. Setting this to False locks the data, making it read-only. A view (slice, etc.) inherits WRITEABLE from its base array at creation time, but a view of a writeable array may be subsequently locked while the base array remains writeable. (The opposite is not true, in that a view of a locked array may not be made writeable. However, currently, locking a base object does not lock any views that already reference it, so under that circumstance it is possible to alter the contents of a locked array via a previously created writeable view onto it.) Attempting to change a non-writeable array raises a RuntimeError exception.  ALIGNED (A)

The data and all elements are aligned appropriately for the hardware.  WRITEBACKIFCOPY (X)

This array is a copy of some other array. The C-API function PyArray_ResolveWritebackIfCopy must be called before deallocating to the base array will be updated with the contents of this array.  UPDATEIFCOPY (U)

(Deprecated, use WRITEBACKIFCOPY) This array is a copy of some other array. When this array is deallocated, the base array will be updated with the contents of this array.  FNC

F_CONTIGUOUS and not C_CONTIGUOUS.  FORC

F_CONTIGUOUS or C_CONTIGUOUS (one-segment test).  BEHAVED (B)

ALIGNED and WRITEABLE.  CARRAY (CA)

BEHAVED and C_CONTIGUOUS.  FARRAY (FA)

BEHAVED and F_CONTIGUOUS and not C_CONTIGUOUS.
numpy.matrix.flat attribute   matrix.flat
 
A 1-D iterator over the array. This is a numpy.flatiter instance, which acts similarly to, but is not a subclass of, Python’s built-in iterator object.  See also  flatten

Return a copy of the array collapsed into one dimension.  flatiter
  Examples >>> x = np.arange(1, 7).reshape(2, 3)
>>> x
array([[1, 2, 3],
       [4, 5, 6]])
>>> x.flat[3]
4
>>> x.T
array([[1, 4],
       [2, 5],
       [3, 6]])
>>> x.T.flat[3]
5
>>> type(x.flat)
<class 'numpy.flatiter'>
 An assignment example: >>> x.flat = 3; x
array([[3, 3, 3],
       [3, 3, 3]])
>>> x.flat[[1,4]] = 1; x
array([[3, 1, 3],
       [3, 1, 3]])
numpy.matrix.flatten method   matrix.flatten(order='C')[source]
 
Return a flattened copy of the matrix. All N elements of the matrix are placed into a single row.  Parameters 
 
order{‘C’, ‘F’, ‘A’, ‘K’}, optional


‘C’ means to flatten in row-major (C-style) order. ‘F’ means to flatten in column-major (Fortran-style) order. ‘A’ means to flatten in column-major order if m is Fortran contiguous in memory, row-major order otherwise. ‘K’ means to flatten m in the order the elements occur in memory. The default is ‘C’.    Returns 
 
ymatrix


A copy of the matrix, flattened to a (1, N) matrix where N is the number of elements in the original matrix.      See also  ravel

Return a flattened array.  flat

A 1-D flat iterator over the matrix.    Examples >>> m = np.matrix([[1,2], [3,4]])
>>> m.flatten()
matrix([[1, 2, 3, 4]])
>>> m.flatten('F')
matrix([[1, 3, 2, 4]])
numpy.matrix.getA method   matrix.getA()[source]
 
Return self as an ndarray object. Equivalent to np.asarray(self).  Parameters 
 None
  Returns 
 
retndarray


self as an ndarray     Examples >>> x = np.matrix(np.arange(12).reshape((3,4))); x
matrix([[ 0,  1,  2,  3],
        [ 4,  5,  6,  7],
        [ 8,  9, 10, 11]])
>>> x.getA()
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11]])