cupy.c

cupy.c_ = <cupy.indexing.generate.CClass object>

Translates slice objects to concatenation along the second axis.

This is a CuPy object that corresponds to cupy.r_(), which is useful because of its common occurrence. In particular, arrays will be stacked along their last axis after being upgraded to at least 2-D with 1’s post-pended to the shape (column vectors made out of 1-D arrays).

For detailed documentation, see r_().

This implementation is partially borrowed from NumPy’s one.

Parameters:a function, so takes no parameters (Not) –
Returns:Joined array.
Return type:cupy.ndarray

See also

numpy.c_()

Examples

>>> a = cupy.array([[1, 2, 3]], dtype=np.int32)
>>> b = cupy.array([[4, 5, 6]], dtype=np.int32)
>>> cupy.c_[a, 0, 0, b]
array([[1, 2, 3, 0, 0, 4, 5, 6]], dtype=int32)