neulab/docprompting-conala huggingface dataset:
numpy.triu_indices   numpy.triu_indices(n, k=0, m=None)[source]
 
Return the indices for the upper-triangle of an (n, m) array.  Parameters 
 
nint


The size of the arrays for which the returned indices will be valid.  
kint, optional


Diagonal offset (see triu for details).  
mint, optional


 New in version 1.9.0.  The column dimension of the arrays for which the returned arrays will be valid. By default m is taken equal to n.    Returns 
 
indstuple, shape(2) of ndarrays, shape(n)


The indices for the triangle. The returned tuple contains two arrays, each with the indices along one dimension of the array. Can be used to slice a ndarray of shape(n, n).      See also  tril_indices

similar function, for lower-triangular.  mask_indices

generic function accepting an arbitrary mask function.  
triu, tril

  Notes  New in version 1.4.0.  Examples Compute two different sets of indices to access 4x4 arrays, one for the upper triangular part starting at the main diagonal, and one starting two diagonals further right: >>> iu1 = np.triu_indices(4)
>>> iu2 = np.triu_indices(4, 2)
 Here is how they can be used with a sample array: >>> a = np.arange(16).reshape(4, 4)
>>> a
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [12, 13, 14, 15]])
 Both for indexing: >>> a[iu1]
array([ 0,  1,  2, ..., 10, 11, 15])
 And for assigning values: >>> a[iu1] = -1
>>> a
array([[-1, -1, -1, -1],
       [ 4, -1, -1, -1],
       [ 8,  9, -1, -1],
       [12, 13, 14, -1]])
 These cover only a small part of the whole array (two diagonals right of the main one): >>> a[iu2] = -10
>>> a
array([[ -1,  -1, -10, -10],
       [  4,  -1,  -1, -10],
       [  8,   9,  -1,  -1],
       [ 12,  13,  14,  -1]])
numpy.triu_indices_from   numpy.triu_indices_from(arr, k=0)[source]
 
Return the indices for the upper-triangle of arr. See triu_indices for full details.  Parameters 
 
arrndarray, shape(N, N)


The indices will be valid for square arrays.  
kint, optional


Diagonal offset (see triu for details).    Returns 
 
triu_indices_fromtuple, shape(2) of ndarray, shape(N)


Indices for the upper-triangle of arr.      See also  
triu_indices, triu

  Notes  New in version 1.4.0.
numpy.true_divide   numpy.true_divide(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'true_divide'>
 
Returns a true division of the inputs, element-wise. Unlike ‘floor division’, true division adjusts the output type to present the best answer, regardless of input types.  Parameters 
 
x1array_like


Dividend array.  
x2array_like


Divisor array. If x1.shape != x2.shape, they must be broadcastable to a common shape (which becomes the shape of the output).  
outndarray, None, or tuple of ndarray and None, 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. A tuple (possible only as a keyword argument) must have length equal to the number of outputs.  
wherearray_like, optional


This condition is broadcast over the input. At locations where the condition is True, the out array will be set to the ufunc result. Elsewhere, the out array will retain its original value. Note that if an uninitialized out array is created via the default out=None, locations within it where the condition is False will remain uninitialized.  **kwargs

For other keyword-only arguments, see the ufunc docs.    Returns 
 
outndarray or scalar


This is a scalar if both x1 and x2 are scalars.     Notes In Python, // is the floor division operator and / the true division operator. The true_divide(x1, x2) function is equivalent to true division in Python. Examples >>> x = np.arange(5)
>>> np.true_divide(x, 4)
array([ 0.  ,  0.25,  0.5 ,  0.75,  1.  ])
 >>> x/4
array([ 0.  ,  0.25,  0.5 ,  0.75,  1.  ])
 >>> x//4
array([0, 0, 0, 0, 1])
 The / operator can be used as a shorthand for np.true_divide on ndarrays. >>> x = np.arange(5)
>>> x / 4
array([0.  , 0.25, 0.5 , 0.75, 1.  ])
numpy.trunc   numpy.trunc(x, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj]) = <ufunc 'trunc'>
 
Return the truncated value of the input, element-wise. The truncated value of the scalar x is the nearest integer i which is closer to zero than x is. In short, the fractional part of the signed number x is discarded.  Parameters 
 
xarray_like


Input data.  
outndarray, None, or tuple of ndarray and None, 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. A tuple (possible only as a keyword argument) must have length equal to the number of outputs.  
wherearray_like, optional


This condition is broadcast over the input. At locations where the condition is True, the out array will be set to the ufunc result. Elsewhere, the out array will retain its original value. Note that if an uninitialized out array is created via the default out=None, locations within it where the condition is False will remain uninitialized.  **kwargs

For other keyword-only arguments, see the ufunc docs.    Returns 
 
yndarray or scalar


The truncated value of each element in x. This is a scalar if x is a scalar.      See also  
ceil, floor, rint, fix

  Notes  New in version 1.3.0.  Examples >>> a = np.array([-1.7, -1.5, -0.2, 0.2, 1.5, 1.7, 2.0])
>>> np.trunc(a)
array([-1., -1., -0.,  0.,  1.,  1.,  2.])
numpy.typename   numpy.typename(char)[source]
 
Return a description for the given data type code.  Parameters 
 
charstr


Data type code.    Returns 
 
outstr


Description of the input data type code.      See also  
dtype, typecodes

  Examples >>> typechars = ['S1', '?', 'B', 'D', 'G', 'F', 'I', 'H', 'L', 'O', 'Q',
...              'S', 'U', 'V', 'b', 'd', 'g', 'f', 'i', 'h', 'l', 'q']
>>> for typechar in typechars:
...     print(typechar, ' : ', np.typename(typechar))
...
S1  :  character
?  :  bool
B  :  unsigned char
D  :  complex double precision
G  :  complex long double precision
F  :  complex single precision
I  :  unsigned integer
H  :  unsigned short
L  :  unsigned long integer
O  :  object
Q  :  unsigned long long integer
S  :  string
U  :  unicode
V  :  void
b  :  signed char
d  :  double precision
g  :  long precision
f  :  single precision
i  :  integer
h  :  short
l  :  long integer
q  :  long long integer
numpy.typing.DTypeLike = typing.Union[...]
 
A Union representing objects that can be coerced into a dtype. Among others this includes the likes of:  
type objects. Character codes or the names of type objects. Objects with the .dtype attribute.   New in version 1.20.   See Also  Specifying and constructing data types

A comprehensive overview of all objects that can be coerced into data types.    Examples >>> import numpy as np
>>> import numpy.typing as npt

>>> def as_dtype(d: npt.DTypeLike) -> np.dtype:
...     return np.dtype(d)
numpy.typing.NDArray = numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]][source]
 
A generic version of np.ndarray[Any, np.dtype[+ScalarType]]. Can be used during runtime for typing arrays with a given dtype and unspecified shape.  New in version 1.21.  Examples >>> import numpy as np
>>> import numpy.typing as npt

>>> print(npt.NDArray)
numpy.ndarray[typing.Any, numpy.dtype[+ScalarType]]

>>> print(npt.NDArray[np.float64])
numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]

>>> NDArrayInt = npt.NDArray[np.int_]
>>> a: NDArrayInt = np.arange(10)

>>> def func(a: npt.ArrayLike) -> npt.NDArray[Any]:
...     return np.array(a)
class numpy.ubyte[source]
 
Unsigned integer type, compatible with C unsigned char.  Character code 
'B'  Alias on this platform (Linux x86_64) 
numpy.uint8: 8-bit unsigned integer (0 to 255).
numpy.ufunc   class numpy.ufunc[source]
 
Functions that operate element by element on whole arrays. To see the documentation for a specific ufunc, use info. For example, np.info(np.sin). Because ufuncs are written in C (for speed) and linked into Python with NumPy’s ufunc facility, Python’s help() function finds this page whenever help() is called on a ufunc. A detailed explanation of ufuncs can be found in the docs for Universal functions (ufunc). Calling ufuncs: op(*x[, out], where=True, **kwargs) Apply op to the arguments *x elementwise, broadcasting the arguments. The broadcasting rules are:  Dimensions of length 1 may be prepended to either array. Arrays may be repeated along dimensions of length 1.   Parameters 
 
*xarray_like


Input arrays.  
outndarray, None, or tuple of ndarray and None, optional


Alternate array object(s) in which to put the result; if provided, it must have a shape that the inputs broadcast to. A tuple of arrays (possible only as a keyword argument) must have length equal to the number of outputs; use None for uninitialized outputs to be allocated by the ufunc.  
wherearray_like, optional


This condition is broadcast over the input. At locations where the condition is True, the out array will be set to the ufunc result. Elsewhere, the out array will retain its original value. Note that if an uninitialized out array is created via the default out=None, locations within it where the condition is False will remain uninitialized.  **kwargs

For other keyword-only arguments, see the ufunc docs.    Returns 
 
rndarray or tuple of ndarray


r will have the shape that the arrays in x broadcast to; if out is provided, it will be returned. If not, r will be allocated and may contain uninitialized values. If the function has more than one output, then the result will be a tuple of arrays.    Attributes 
 identity

The identity value.  nargs

The number of arguments.  nin

The number of inputs.  nout

The number of outputs.  ntypes

The number of types.  signature

Definition of the core elements a generalized ufunc operates on.  types

Returns a list with types grouped input->output.     Methods  
__call__(*args, **kwargs) Call self as a function.  
accumulate(array[, axis, dtype, out]) Accumulate the result of applying the operator to all elements.  
at(a, indices[, b]) Performs unbuffered in place operation on operand 'a' for elements specified by 'indices'.  
outer(A, B, /, **kwargs) Apply the ufunc op to all pairs (a, b) with a in A and b in B.  
reduce(array[, axis, dtype, out, keepdims, ...]) Reduces array's dimension by one, by applying ufunc along one axis.  
reduceat(array, indices[, axis, dtype, out]) Performs a (local) reduce with specified slices over a single axis.
class numpy.uint[source]
 
Unsigned integer type, compatible with C unsigned long.  Character code 
'L'  Alias on this platform (Linux x86_64) 
numpy.uint64: 64-bit unsigned integer (0 to 18_446_744_073_709_551_615).  Alias on this platform (Linux x86_64) 
numpy.uintp: Unsigned integer large enough to fit pointer, compatible with C uintptr_t.
numpy.uint8[source]
  numpy.uint16
  numpy.uint32
  numpy.uint64
 
Alias for the unsigned integer types (one of numpy.ubyte, numpy.ushort, numpy.uintc, numpy.uint and numpy.ulonglong) with the specified number of bits. Compatible with the C99 uint8_t, uint16_t, uint32_t, and uint64_t, respectively.
class numpy.uintc[source]
 
Unsigned integer type, compatible with C unsigned int.  Character code 
'I'  Alias on this platform (Linux x86_64) 
numpy.uint32: 32-bit unsigned integer (0 to 4_294_967_295).
numpy.uintp[source]
 
Alias for the unsigned integer type (one of numpy.ubyte, numpy.ushort, numpy.uintc, numpy.uint and np.ulonglong) that is the same size as a pointer. Compatible with the C uintptr_t.  Character code 
'P'
class numpy.ulonglong[source]
 
Signed integer type, compatible with C unsigned long long.  Character code 
'Q'
numpy.union1d   numpy.union1d(ar1, ar2)[source]
 
Find the union of two arrays. Return the unique, sorted array of values that are in either of the two input arrays.  Parameters 
 
ar1, ar2array_like


Input arrays. They are flattened if they are not already 1D.    Returns 
 
union1dndarray


Unique, sorted union of the input arrays.      See also  numpy.lib.arraysetops

Module with a number of other functions for performing set operations on arrays.    Examples >>> np.union1d([-1, 0, 1], [-2, 0, 2])
array([-2, -1,  0,  1,  2])
 To find the union of more than two arrays, use functools.reduce: >>> from functools import reduce
>>> reduce(np.union1d, ([1, 3, 4, 3], [3, 1, 2, 1], [6, 3, 4, 2]))
array([1, 2, 3, 4, 6])
numpy.unpackbits   numpy.unpackbits(a, /, axis=None, count=None, bitorder='big')
 
Unpacks elements of a uint8 array into a binary-valued output array. Each element of a represents a bit-field that should be unpacked into a binary-valued output array. The shape of the output array is either 1-D (if axis is None) or the same shape as the input array with unpacking done along the axis specified.  Parameters 
 
andarray, uint8 type


Input array.  
axisint, optional


The dimension over which bit-unpacking is done. None implies unpacking the flattened array.  
countint or None, optional


The number of elements to unpack along axis, provided as a way of undoing the effect of packing a size that is not a multiple of eight. A non-negative number means to only unpack count bits. A negative number means to trim off that many bits from the end. None means to unpack the entire array (the default). Counts larger than the available number of bits will add zero padding to the output. Negative counts must not exceed the available number of bits.  New in version 1.17.0.   
bitorder{‘big’, ‘little’}, optional


The order of the returned bits. ‘big’ will mimic bin(val), 3 = 0b00000011 => [0, 0, 0, 0, 0, 0, 1, 1], ‘little’ will reverse the order to [1, 1, 0, 0, 0, 0, 0, 0]. Defaults to ‘big’.  New in version 1.17.0.     Returns 
 
unpackedndarray, uint8 type


The elements are binary-valued (0 or 1).      See also  packbits

Packs the elements of a binary-valued array into bits in a uint8 array.    Examples >>> a = np.array([[2], [7], [23]], dtype=np.uint8)
>>> a
array([[ 2],
       [ 7],
       [23]], dtype=uint8)
>>> b = np.unpackbits(a, axis=1)
>>> b
array([[0, 0, 0, 0, 0, 0, 1, 0],
       [0, 0, 0, 0, 0, 1, 1, 1],
       [0, 0, 0, 1, 0, 1, 1, 1]], dtype=uint8)
>>> c = np.unpackbits(a, axis=1, count=-3)
>>> c
array([[0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0],
       [0, 0, 0, 1, 0]], dtype=uint8)
 >>> p = np.packbits(b, axis=0)
>>> np.unpackbits(p, axis=0)
array([[0, 0, 0, 0, 0, 0, 1, 0],
       [0, 0, 0, 0, 0, 1, 1, 1],
       [0, 0, 0, 1, 0, 1, 1, 1],
       [0, 0, 0, 0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0, 0, 0, 0],
       [0, 0, 0, 0, 0, 0, 0, 0]], dtype=uint8)
>>> np.array_equal(b, np.unpackbits(p, axis=0, count=b.shape[0]))
True
numpy.unravel_index   numpy.unravel_index(indices, shape, order='C')
 
Converts a flat index or array of flat indices into a tuple of coordinate arrays.  Parameters 
 
indicesarray_like


An integer array whose elements are indices into the flattened version of an array of dimensions shape. Before version 1.6.0, this function accepted just one index value.  
shapetuple of ints


The shape of the array to use for unraveling indices.  Changed in version 1.16.0: Renamed from dims to shape.   
order{‘C’, ‘F’}, optional


Determines whether the indices should be viewed as indexing in row-major (C-style) or column-major (Fortran-style) order.  New in version 1.6.0.     Returns 
 
unraveled_coordstuple of ndarray


Each array in the tuple has the same shape as the indices array.      See also  ravel_multi_index
  Examples >>> np.unravel_index([22, 41, 37], (7,6))
(array([3, 6, 6]), array([4, 5, 1]))
>>> np.unravel_index([31, 41, 13], (7,6), order='F')
(array([3, 6, 6]), array([4, 5, 1]))
 >>> np.unravel_index(1621, (6,7,8,9))
(3, 1, 4, 1)
numpy.unwrap   numpy.unwrap(p, discont=None, axis=- 1, *, period=6.283185307179586)[source]
 
Unwrap by taking the complement of large deltas with respect to the period. This unwraps a signal p by changing elements which have an absolute difference from their predecessor of more than max(discont, period/2) to their period-complementary values. For the default case where period is \(2\pi\) and discont is \(\pi\), this unwraps a radian phase p such that adjacent differences are never greater than \(\pi\) by adding \(2k\pi\) for some integer \(k\).  Parameters 
 
parray_like


Input array.  
discontfloat, optional


Maximum discontinuity between values, default is period/2. Values below period/2 are treated as if they were period/2. To have an effect different from the default, discont should be larger than period/2.  
axisint, optional


Axis along which unwrap will operate, default is the last axis.  period: float, optional

Size of the range over which the input wraps. By default, it is 2 pi.  New in version 1.21.0.     Returns 
 
outndarray


Output array.      See also  
rad2deg, deg2rad

  Notes If the discontinuity in p is smaller than period/2, but larger than discont, no unwrapping is done because taking the complement would only make the discontinuity larger. Examples >>> phase = np.linspace(0, np.pi, num=5)
>>> phase[3:] += np.pi
>>> phase
array([ 0.        ,  0.78539816,  1.57079633,  5.49778714,  6.28318531]) # may vary
>>> np.unwrap(phase)
array([ 0.        ,  0.78539816,  1.57079633, -0.78539816,  0.        ]) # may vary
>>> np.unwrap([0, 1, 2, -1, 0], period=4)
array([0, 1, 2, 3, 4])
>>> np.unwrap([ 1, 2, 3, 4, 5, 6, 1, 2, 3], period=6)
array([1, 2, 3, 4, 5, 6, 7, 8, 9])
>>> np.unwrap([2, 3, 4, 5, 2, 3, 4, 5], period=4)
array([2, 3, 4, 5, 6, 7, 8, 9])
>>> phase_deg = np.mod(np.linspace(0 ,720, 19), 360) - 180
>>> np.unwrap(phase_deg, period=360)
array([-180., -140., -100.,  -60.,  -20.,   20.,   60.,  100.,  140.,
        180.,  220.,  260.,  300.,  340.,  380.,  420.,  460.,  500.,
        540.])
class numpy.ushort[source]
 
Unsigned integer type, compatible with C unsigned short.  Character code 
'H'  Alias on this platform (Linux x86_64) 
numpy.uint16: 16-bit unsigned integer (0 to 65_535).
numpy.vander   numpy.vander(x, N=None, increasing=False)[source]
 
Generate a Vandermonde matrix. The columns of the output matrix are powers of the input vector. The order of the powers is determined by the increasing boolean argument. Specifically, when increasing is False, the i-th output column is the input vector raised element-wise to the power of N - i - 1. Such a matrix with a geometric progression in each row is named for Alexandre- Theophile Vandermonde.  Parameters 
 
xarray_like


1-D input array.  
Nint, optional


Number of columns in the output. If N is not specified, a square array is returned (N = len(x)).  
increasingbool, optional


Order of the powers of the columns. If True, the powers increase from left to right, if False (the default) they are reversed.  New in version 1.9.0.     Returns 
 
outndarray


Vandermonde matrix. If increasing is False, the first column is x^(N-1), the second x^(N-2) and so forth. If increasing is True, the columns are x^0, x^1, ..., x^(N-1).      See also  polynomial.polynomial.polyvander
  Examples >>> x = np.array([1, 2, 3, 5])
>>> N = 3
>>> np.vander(x, N)
array([[ 1,  1,  1],
       [ 4,  2,  1],
       [ 9,  3,  1],
       [25,  5,  1]])
 >>> np.column_stack([x**(N-1-i) for i in range(N)])
array([[ 1,  1,  1],
       [ 4,  2,  1],
       [ 9,  3,  1],
       [25,  5,  1]])
 >>> x = np.array([1, 2, 3, 5])
>>> np.vander(x)
array([[  1,   1,   1,   1],
       [  8,   4,   2,   1],
       [ 27,   9,   3,   1],
       [125,  25,   5,   1]])
>>> np.vander(x, increasing=True)
array([[  1,   1,   1,   1],
       [  1,   2,   4,   8],
       [  1,   3,   9,  27],
       [  1,   5,  25, 125]])
 The determinant of a square Vandermonde matrix is the product of the differences between the values of the input vector: >>> np.linalg.det(np.vander(x))
48.000000000000043 # may vary
>>> (5-3)*(5-2)*(5-1)*(3-2)*(3-1)*(2-1)
48
numpy.vdot   numpy.vdot(a, b, /)
 
Return the dot product of two vectors. The vdot(a, b) function handles complex numbers differently than dot(a, b). If the first argument is complex the complex conjugate of the first argument is used for the calculation of the dot product. Note that vdot handles multidimensional arrays differently than dot: it does not perform a matrix product, but flattens input arguments to 1-D vectors first. Consequently, it should only be used for vectors.  Parameters 
 
aarray_like


If a is complex the complex conjugate is taken before calculation of the dot product.  
barray_like


Second argument to the dot product.    Returns 
 
outputndarray


Dot product of a and b. Can be an int, float, or complex depending on the types of a and b.      See also  dot

Return the dot product without using the complex conjugate of the first argument.    Examples >>> a = np.array([1+2j,3+4j])
>>> b = np.array([5+6j,7+8j])
>>> np.vdot(a, b)
(70-8j)
>>> np.vdot(b, a)
(70+8j)
 Note that higher-dimensional arrays are flattened! >>> a = np.array([[1, 4], [5, 6]])
>>> b = np.array([[4, 1], [2, 2]])
>>> np.vdot(a, b)
30
>>> np.vdot(b, a)
30
>>> 1*4 + 4*1 + 5*2 + 6*2
30
class numpy.void[source]
 
Either an opaque sequence of bytes, or a structure. >>> np.void(b'abcd')
void(b'\x61\x62\x63\x64')
 Structured void scalars can only be constructed via extraction from Structured arrays: >>> arr = np.array((1, 2), dtype=[('x', np.int8), ('y', np.int8)])
>>> arr[()]
(1, 2)  # looks like a tuple, but is `np.void`
  Character code 
'V'
numpy.vsplit   numpy.vsplit(ary, indices_or_sections)[source]
 
Split an array into multiple sub-arrays vertically (row-wise). Please refer to the split documentation. vsplit is equivalent to split with axis=0 (default), the array is always split along the first axis regardless of the array dimension.  See also  split

Split an array into multiple sub-arrays of equal size.    Examples >>> x = np.arange(16.0).reshape(4, 4)
>>> x
array([[ 0.,   1.,   2.,   3.],
       [ 4.,   5.,   6.,   7.],
       [ 8.,   9.,  10.,  11.],
       [12.,  13.,  14.,  15.]])
>>> np.vsplit(x, 2)
[array([[0., 1., 2., 3.],
       [4., 5., 6., 7.]]), array([[ 8.,  9., 10., 11.],
       [12., 13., 14., 15.]])]
>>> np.vsplit(x, np.array([3, 6]))
[array([[ 0.,  1.,  2.,  3.],
       [ 4.,  5.,  6.,  7.],
       [ 8.,  9., 10., 11.]]), array([[12., 13., 14., 15.]]), array([], shape=(0, 4), dtype=float64)]
 With a higher dimensional array the split is still along the first axis. >>> x = np.arange(8.0).reshape(2, 2, 2)
>>> x
array([[[0.,  1.],
        [2.,  3.]],
       [[4.,  5.],
        [6.,  7.]]])
>>> np.vsplit(x, 2)
[array([[[0., 1.],
        [2., 3.]]]), array([[[4., 5.],
        [6., 7.]]])]
numpy.vstack   numpy.vstack(tup)[source]
 
Stack arrays in sequence vertically (row wise). This is equivalent to concatenation along the first axis after 1-D arrays of shape (N,) have been reshaped to (1,N). Rebuilds arrays divided by vsplit. This function makes most sense for arrays with up to 3 dimensions. For instance, for pixel-data with a height (first axis), width (second axis), and r/g/b channels (third axis). The functions concatenate, stack and block provide more general stacking and concatenation operations.  Parameters 
 
tupsequence of ndarrays


The arrays must have the same shape along all but the first axis. 1-D arrays must have the same length.    Returns 
 
stackedndarray


The array formed by stacking the given arrays, will be at least 2-D.      See also  concatenate

Join a sequence of arrays along an existing axis.  stack

Join a sequence of arrays along a new axis.  block

Assemble an nd-array from nested lists of blocks.  hstack

Stack arrays in sequence horizontally (column wise).  dstack

Stack arrays in sequence depth wise (along third axis).  column_stack

Stack 1-D arrays as columns into a 2-D array.  vsplit

Split an array into multiple sub-arrays vertically (row-wise).    Examples >>> a = np.array([1, 2, 3])
>>> b = np.array([4, 5, 6])
>>> np.vstack((a,b))
array([[1, 2, 3],
       [4, 5, 6]])
 >>> a = np.array([[1], [2], [3]])
>>> b = np.array([[4], [5], [6]])
>>> np.vstack((a,b))
array([[1],
       [2],
       [3],
       [4],
       [5],
       [6]])