def atleast_2d(*arys):
 res = []
 for a in arys:
  if (not isinstance(a, cupy.ndarray)):
   raise TypeError('Only cupy arrays can be atleast_2d')
  if (a.ndim == 0):
   a = a.reshape(1, 1)
  elif (a.ndim == 1):
   a = a[None, :]
  res.append(a)
 if (len(res) == 1):
  res = res[0]
 return res

def atleast_2d ( * arys ) : res = [ ] for a in arys : if ( not isinstance ( a , cupy . ndarray ) ) : raise TypeError ( 'Only cupy arrays can be atleast_2d' ) if ( a . ndim == 0 ) : a = a . reshape ( 1 , 1 ) elif ( a . ndim == 1 ) : a = a [ None , : ] res . append ( a ) if ( len ( res ) == 1 ) : res = res [ 0 ] return res
converts arrays to arrays with dimensions >= 2 .