def _array_like(x, x0):
 x = np.reshape(x, np.shape(x0))
 wrap = getattr(x0, '__array_wrap__', x.__array_wrap__)
 return wrap(x)

def _array_like ( x , x0 ) : x = np . reshape ( x , np . shape ( x0 ) ) wrap = getattr ( x0 , '__array_wrap__' , x . __array_wrap__ ) return wrap ( x )
return ndarray x as same array subclass and shape as x0 .