#NEWLINE# def ones_like( array , stream = None ) : #NEWLINE# #INDENT# 'Creates a one-filled :class:`cupy.ndarray` object like the given array.\n\n    Args:\n        array (cupy.ndarray or numpy.ndarray): Base array.\n        stream (cupy.cuda.Stream): CUDA stream.\n\n    Returns:\n        cupy.ndarray: One-filled array.\n\n    ' #NEWLINE# warnings . warn ( 'chainer.cuda.ones_like is deprecated. Use cupy.ones_like instead.' , DeprecationWarning ) #NEWLINE# check_cuda_available ( ) #NEWLINE# assert ( stream is None ) #NEWLINE# if isinstance ( array , cupy . ndarray ) : #NEWLINE# #INDENT# return cupy . ones_like ( stream ) #NEWLINE# #UNINDENT# return cupy . ones ( array . shape , dtype = array . dtype )