def ones_like(a, dtype=None):
 if (dtype is None):
  dtype = a.dtype
 return ones(a.shape, dtype)

def ones_like ( a , dtype = None ) : if ( dtype is None ) : dtype = a . dtype return ones ( a . shape , dtype )
creates a one-filled :class:cupy .