def hstack(tup):
 arrs = [cupy.atleast_1d(a) for a in tup]
 axis = 1
 if (arrs[0].ndim == 1):
  axis = 0
 return concatenate(arrs, axis)

def hstack ( tup ) : arrs = [ cupy . atleast_1d ( a ) for a in tup ] axis = 1 if ( arrs [ 0 ] . ndim == 1 ) : axis = 0 return concatenate ( arrs , axis )
stack sparse matrices horizontally parameters blocks sequence of sparse matrices with compatible shapes format : str sparse format of the result by default an appropriate sparse matrix format is returned .