eric-haibin-lin commented on issue #18600:
URL: 
https://github.com/apache/incubator-mxnet/issues/18600#issuecomment-647192100


   Error Log 
   ```
   [2020-06-20T23:26:16.963Z] _______________________________ test_np_delete 
________________________________
   [2020-06-20T23:26:16.963Z] [gw3] win32 -- Python 3.7.3 C:\Python37\python.exe
   [2020-06-20T23:26:16.963Z] 
   [2020-06-20T23:26:16.963Z]     @with_seed()
   [2020-06-20T23:26:16.963Z]     @use_np
   [2020-06-20T23:26:16.963Z]     def test_np_delete():
   [2020-06-20T23:26:16.963Z]         class TestDelete(HybridBlock):
   [2020-06-20T23:26:16.963Z]             def __init__(self, obj, axis=None):
   [2020-06-20T23:26:16.963Z]                 super(TestDelete, self).__init__()
   [2020-06-20T23:26:16.963Z]                 self._obj = obj
   [2020-06-20T23:26:16.963Z]                 self._axis = axis
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]             def hybrid_forward(self, F, a):
   [2020-06-20T23:26:16.963Z]                 return F.np.delete(a, self._obj, 
axis=self._axis)
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         def GetSize(shp):
   [2020-06-20T23:26:16.963Z]             if len(shp) == 0:
   [2020-06-20T23:26:16.963Z]                 return 0
   [2020-06-20T23:26:16.963Z]             else:
   [2020-06-20T23:26:16.963Z]                 res = 1
   [2020-06-20T23:26:16.963Z]                 shp_list = list(shp)
   [2020-06-20T23:26:16.963Z]                 for x in shp:
   [2020-06-20T23:26:16.963Z]                     res *= x
   [2020-06-20T23:26:16.963Z]                 return res
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         def GetDimSize(shp, axis):
   [2020-06-20T23:26:16.963Z]             if axis is None:
   [2020-06-20T23:26:16.963Z]                 return GetSize(shp)
   [2020-06-20T23:26:16.963Z]             shp_list = list(shp)
   [2020-06-20T23:26:16.963Z]             return shp_list[axis]
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         shape = [(), (0, ), (1, ), (2, 3), (2, 1, 
4, 5)]
   [2020-06-20T23:26:16.963Z]         config = []
   [2020-06-20T23:26:16.963Z]         for shp in shape:
   [2020-06-20T23:26:16.963Z]             for ax in range(-1 * len(shp), 
len(shp), 2):
   [2020-06-20T23:26:16.963Z]                 #test slice
   [2020-06-20T23:26:16.963Z]                 for st in [-5, -2, 0, 2, 5, None]:
   [2020-06-20T23:26:16.963Z]                     for ed in [-5, -2, 0, 2, 5, 
None]:
   [2020-06-20T23:26:16.963Z]                         for stp in [-5, -2, 2, 5, 
None]:
   [2020-06-20T23:26:16.963Z]                             
config.append(tuple([shp, slice(st, ed, stp), None]))
   [2020-06-20T23:26:16.963Z]                             
config.append(tuple([shp, slice(st, ed, stp), ax]))
   [2020-06-20T23:26:16.963Z]                 #test iteger
   [2020-06-20T23:26:16.963Z]                 for idx in range(-1 * 
GetDimSize(shp, ax), GetDimSize(shp, ax)):
   [2020-06-20T23:26:16.963Z]                     config.append(tuple([shp, 
idx, ax]))
   [2020-06-20T23:26:16.963Z]                 #test ndarray indices
   [2020-06-20T23:26:16.963Z]                 idx =  _np.random.randint(-1 * 
shp[ax], shp[ax] + 1, size = (4)).tolist()
   [2020-06-20T23:26:16.963Z]                 config.append(tuple([shp, idx, 
ax]))
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         for arr_shape, obj, axis in config:
   [2020-06-20T23:26:16.963Z]             for objtype in ['int32', 'int64']:
   [2020-06-20T23:26:16.963Z]                 if type(obj) == list:
   [2020-06-20T23:26:16.963Z]                     obj_mxnp = np.array(obj, 
dtype=objtype)
   [2020-06-20T23:26:16.963Z]                     obj_onp = _np.array(obj, 
dtype=objtype)
   [2020-06-20T23:26:16.963Z]                 elif type(obj) == slice:
   [2020-06-20T23:26:16.963Z]                     obj_mxnp = obj
   [2020-06-20T23:26:16.963Z]                     obj_onp = obj
   [2020-06-20T23:26:16.963Z]                 else:
   [2020-06-20T23:26:16.963Z]                     obj_mxnp = (_np.int32(obj) if 
objtype == 'int32' else _np.int64(obj))
   [2020-06-20T23:26:16.963Z]                     obj_onp = (_np.int32(obj) if 
objtype == 'int32' else _np.int64(obj))
   [2020-06-20T23:26:16.963Z]                 test_delete = 
TestDelete(obj=obj_mxnp, axis=axis)
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]                 a = mx.nd.random.uniform(-1.0, 
1.0, shape=arr_shape).as_np_ndarray()
   [2020-06-20T23:26:16.963Z]                 a.attach_grad()
   [2020-06-20T23:26:16.963Z] >               expected_ret = 
_np.delete(a.asnumpy(), obj_onp, axis=axis)
   [2020-06-20T23:26:16.963Z] 
   [2020-06-20T23:26:16.963Z] tests\python\unittest\test_numpy_op.py:4255: 
   [2020-06-20T23:26:16.963Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   [2020-06-20T23:26:16.963Z] <__array_function__ internals>:6: in delete
   [2020-06-20T23:26:16.963Z]     ???
   [2020-06-20T23:26:16.963Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   [2020-06-20T23:26:16.963Z] 
   [2020-06-20T23:26:16.963Z] arr = array([], dtype=float32), obj = array([0, 
0, 0, 0]), axis = 0
   [2020-06-20T23:26:16.963Z] 
   [2020-06-20T23:26:16.963Z]     @array_function_dispatch(_delete_dispatcher)
   [2020-06-20T23:26:16.963Z]     def delete(arr, obj, axis=None):
   [2020-06-20T23:26:16.963Z]         """
   [2020-06-20T23:26:16.963Z]         Return a new array with sub-arrays along 
an axis deleted. For a one
   [2020-06-20T23:26:16.963Z]         dimensional array, this returns those 
entries not returned by
   [2020-06-20T23:26:16.963Z]         `arr[obj]`.
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         Parameters
   [2020-06-20T23:26:16.963Z]         ----------
   [2020-06-20T23:26:16.963Z]         arr : array_like
   [2020-06-20T23:26:16.963Z]             Input array.
   [2020-06-20T23:26:16.963Z]         obj : slice, int or array of ints
   [2020-06-20T23:26:16.963Z]             Indicate indices of sub-arrays to 
remove along the specified axis.
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]             .. versionchanged:: 1.19.0
   [2020-06-20T23:26:16.963Z]                 Boolean indices are now treated 
as a mask of elements to remove,
   [2020-06-20T23:26:16.963Z]                 rather than being cast to the 
integers 0 and 1.
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         axis : int, optional
   [2020-06-20T23:26:16.963Z]             The axis along which to delete the 
subarray defined by `obj`.
   [2020-06-20T23:26:16.963Z]             If `axis` is None, `obj` is applied 
to the flattened array.
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         Returns
   [2020-06-20T23:26:16.963Z]         -------
   [2020-06-20T23:26:16.963Z]         out : ndarray
   [2020-06-20T23:26:16.963Z]             A copy of `arr` with the elements 
specified by `obj` removed. Note
   [2020-06-20T23:26:16.963Z]             that `delete` does not occur 
in-place. If `axis` is None, `out` is
   [2020-06-20T23:26:16.963Z]             a flattened array.
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         See Also
   [2020-06-20T23:26:16.963Z]         --------
   [2020-06-20T23:26:16.963Z]         insert : Insert elements into an array.
   [2020-06-20T23:26:16.963Z]         append : Append elements at the end of an 
array.
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         Notes
   [2020-06-20T23:26:16.963Z]         -----
   [2020-06-20T23:26:16.963Z]         Often it is preferable to use a boolean 
mask. For example:
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         >>> arr = np.arange(12) + 1
   [2020-06-20T23:26:16.963Z]         >>> mask = np.ones(len(arr), dtype=bool)
   [2020-06-20T23:26:16.963Z]         >>> mask[[0,2,4]] = False
   [2020-06-20T23:26:16.963Z]         >>> result = arr[mask,...]
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         Is equivalent to `np.delete(arr, [0,2,4], 
axis=0)`, but allows further
   [2020-06-20T23:26:16.963Z]         use of `mask`.
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         Examples
   [2020-06-20T23:26:16.963Z]         --------
   [2020-06-20T23:26:16.963Z]         >>> arr = np.array([[1,2,3,4], [5,6,7,8], 
[9,10,11,12]])
   [2020-06-20T23:26:16.963Z]         >>> arr
   [2020-06-20T23:26:16.963Z]         array([[ 1,  2,  3,  4],
   [2020-06-20T23:26:16.963Z]                [ 5,  6,  7,  8],
   [2020-06-20T23:26:16.963Z]                [ 9, 10, 11, 12]])
   [2020-06-20T23:26:16.963Z]         >>> np.delete(arr, 1, 0)
   [2020-06-20T23:26:16.963Z]         array([[ 1,  2,  3,  4],
   [2020-06-20T23:26:16.963Z]                [ 9, 10, 11, 12]])
   [2020-06-20T23:26:16.963Z]     
   [2020-06-20T23:26:16.963Z]         >>> np.delete(arr, np.s_[::2], 1)
   [2020-06-20T23:26:16.963Z]         array([[ 2,  4],
   [2020-06-20T23:26:16.964Z]                [ 6,  8],
   [2020-06-20T23:26:16.964Z]                [10, 12]])
   [2020-06-20T23:26:16.964Z]         >>> np.delete(arr, [1,3,5], None)
   [2020-06-20T23:26:16.964Z]         array([ 1,  3,  5,  7,  8,  9, 10, 11, 
12])
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         """
   [2020-06-20T23:26:16.964Z]         wrap = None
   [2020-06-20T23:26:16.964Z]         if type(arr) is not ndarray:
   [2020-06-20T23:26:16.964Z]             try:
   [2020-06-20T23:26:16.964Z]                 wrap = arr.__array_wrap__
   [2020-06-20T23:26:16.964Z]             except AttributeError:
   [2020-06-20T23:26:16.964Z]                 pass
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         arr = asarray(arr)
   [2020-06-20T23:26:16.964Z]         ndim = arr.ndim
   [2020-06-20T23:26:16.964Z]         arrorder = 'F' if arr.flags.fnc else 'C'
   [2020-06-20T23:26:16.964Z]         if axis is None:
   [2020-06-20T23:26:16.964Z]             if ndim != 1:
   [2020-06-20T23:26:16.964Z]                 arr = arr.ravel()
   [2020-06-20T23:26:16.964Z]             # needed for np.matrix, which is 
still not 1d after being ravelled
   [2020-06-20T23:26:16.964Z]             ndim = arr.ndim
   [2020-06-20T23:26:16.964Z]             axis = ndim - 1
   [2020-06-20T23:26:16.964Z]         else:
   [2020-06-20T23:26:16.964Z]             axis = normalize_axis_index(axis, 
ndim)
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         slobj = [slice(None)]*ndim
   [2020-06-20T23:26:16.964Z]         N = arr.shape[axis]
   [2020-06-20T23:26:16.964Z]         newshape = list(arr.shape)
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         if isinstance(obj, slice):
   [2020-06-20T23:26:16.964Z]             start, stop, step = obj.indices(N)
   [2020-06-20T23:26:16.964Z]             xr = range(start, stop, step)
   [2020-06-20T23:26:16.964Z]             numtodel = len(xr)
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]             if numtodel <= 0:
   [2020-06-20T23:26:16.964Z]                 if wrap:
   [2020-06-20T23:26:16.964Z]                     return 
wrap(arr.copy(order=arrorder))
   [2020-06-20T23:26:16.964Z]                 else:
   [2020-06-20T23:26:16.964Z]                     return 
arr.copy(order=arrorder)
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]             # Invert if step is negative:
   [2020-06-20T23:26:16.964Z]             if step < 0:
   [2020-06-20T23:26:16.964Z]                 step = -step
   [2020-06-20T23:26:16.964Z]                 start = xr[-1]
   [2020-06-20T23:26:16.964Z]                 stop = xr[0] + 1
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]             newshape[axis] -= numtodel
   [2020-06-20T23:26:16.964Z]             new = empty(newshape, arr.dtype, 
arrorder)
   [2020-06-20T23:26:16.964Z]             # copy initial chunk
   [2020-06-20T23:26:16.964Z]             if start == 0:
   [2020-06-20T23:26:16.964Z]                 pass
   [2020-06-20T23:26:16.964Z]             else:
   [2020-06-20T23:26:16.964Z]                 slobj[axis] = slice(None, start)
   [2020-06-20T23:26:16.964Z]                 new[tuple(slobj)] = 
arr[tuple(slobj)]
   [2020-06-20T23:26:16.964Z]             # copy end chunk
   [2020-06-20T23:26:16.964Z]             if stop == N:
   [2020-06-20T23:26:16.964Z]                 pass
   [2020-06-20T23:26:16.964Z]             else:
   [2020-06-20T23:26:16.964Z]                 slobj[axis] = 
slice(stop-numtodel, None)
   [2020-06-20T23:26:16.964Z]                 slobj2 = [slice(None)]*ndim
   [2020-06-20T23:26:16.964Z]                 slobj2[axis] = slice(stop, None)
   [2020-06-20T23:26:16.964Z]                 new[tuple(slobj)] = 
arr[tuple(slobj2)]
   [2020-06-20T23:26:16.964Z]             # copy middle pieces
   [2020-06-20T23:26:16.964Z]             if step == 1:
   [2020-06-20T23:26:16.964Z]                 pass
   [2020-06-20T23:26:16.964Z]             else:  # use array indexing.
   [2020-06-20T23:26:16.964Z]                 keep = ones(stop-start, 
dtype=bool)
   [2020-06-20T23:26:16.964Z]                 keep[:stop-start:step] = False
   [2020-06-20T23:26:16.964Z]                 slobj[axis] = slice(start, 
stop-numtodel)
   [2020-06-20T23:26:16.964Z]                 slobj2 = [slice(None)]*ndim
   [2020-06-20T23:26:16.964Z]                 slobj2[axis] = slice(start, stop)
   [2020-06-20T23:26:16.964Z]                 arr = arr[tuple(slobj2)]
   [2020-06-20T23:26:16.964Z]                 slobj2[axis] = keep
   [2020-06-20T23:26:16.964Z]                 new[tuple(slobj)] = 
arr[tuple(slobj2)]
   [2020-06-20T23:26:16.964Z]             if wrap:
   [2020-06-20T23:26:16.964Z]                 return wrap(new)
   [2020-06-20T23:26:16.964Z]             else:
   [2020-06-20T23:26:16.964Z]                 return new
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         if isinstance(obj, (int, integer)) and 
not isinstance(obj, bool):
   [2020-06-20T23:26:16.964Z]             # optimization for a single value
   [2020-06-20T23:26:16.964Z]             if (obj < -N or obj >= N):
   [2020-06-20T23:26:16.964Z]                 raise IndexError(
   [2020-06-20T23:26:16.964Z]                     "index %i is out of bounds 
for axis %i with "
   [2020-06-20T23:26:16.964Z]                     "size %i" % (obj, axis, N))
   [2020-06-20T23:26:16.964Z]             if (obj < 0):
   [2020-06-20T23:26:16.964Z]                 obj += N
   [2020-06-20T23:26:16.964Z]             newshape[axis] -= 1
   [2020-06-20T23:26:16.964Z]             new = empty(newshape, arr.dtype, 
arrorder)
   [2020-06-20T23:26:16.964Z]             slobj[axis] = slice(None, obj)
   [2020-06-20T23:26:16.964Z]             new[tuple(slobj)] = arr[tuple(slobj)]
   [2020-06-20T23:26:16.964Z]             slobj[axis] = slice(obj, None)
   [2020-06-20T23:26:16.964Z]             slobj2 = [slice(None)]*ndim
   [2020-06-20T23:26:16.964Z]             slobj2[axis] = slice(obj+1, None)
   [2020-06-20T23:26:16.964Z]             new[tuple(slobj)] = arr[tuple(slobj2)]
   [2020-06-20T23:26:16.964Z]         else:
   [2020-06-20T23:26:16.964Z]             _obj = obj
   [2020-06-20T23:26:16.964Z]             obj = np.asarray(obj)
   [2020-06-20T23:26:16.964Z]             if obj.size == 0 and not 
isinstance(_obj, np.ndarray):
   [2020-06-20T23:26:16.964Z]                 obj = obj.astype(intp)
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]             if obj.dtype == bool:
   [2020-06-20T23:26:16.964Z]                 if obj.shape != (N,):
   [2020-06-20T23:26:16.964Z]                     raise ValueError('boolean 
array argument obj to delete '
   [2020-06-20T23:26:16.964Z]                                      'must be one 
dimensional and match the axis '
   [2020-06-20T23:26:16.964Z]                                      'length of 
{}'.format(N))
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]                 # optimization, the other branch 
is slower
   [2020-06-20T23:26:16.964Z]                 keep = ~obj
   [2020-06-20T23:26:16.964Z]             else:
   [2020-06-20T23:26:16.964Z]                 keep = ones(N, dtype=bool)
   [2020-06-20T23:26:16.964Z] >               keep[obj,] = False
   [2020-06-20T23:26:16.964Z] E               IndexError: index 0 is out of 
bounds for axis 0 with size 0
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] 
C:\Python37\lib\site-packages\numpy\lib\function_base.py:4406: IndexError
   [2020-06-20T23:26:16.964Z] ----------------------------- Captured log setup 
------------------------------
   [2020-06-20T23:26:16.964Z] DEBUG    root:conftest.py:193 
np/mx/python random seeds are set to 1481650552, use MXNET_TEST_SEED=1481650552 
to reproduce.
   [2020-06-20T23:26:16.964Z] ---------------------------- Captured stderr call 
-----------------------------
   [2020-06-20T23:26:16.964Z] [DEBUG] Setting test np/mx/python random seeds, 
use MXNET_TEST_SEED=117564977 to reproduce.
   [2020-06-20T23:26:16.964Z] [INFO] Setting test np/mx/python random seeds, 
use MXNET_TEST_SEED=117564977 to reproduce.
   [2020-06-20T23:26:16.964Z] ------------------------------ Captured log call 
------------------------------
   [2020-06-20T23:26:16.964Z] DEBUG    common:common.py:221 Setting 
test np/mx/python random seeds, use MXNET_TEST_SEED=117564977 to reproduce.
   [2020-06-20T23:26:16.964Z] INFO     common:common.py:227 Setting 
test np/mx/python random seeds, use MXNET_TEST_SEED=117564977 to reproduce.
   [2020-06-20T23:26:16.964Z] ---------------------------- Captured log 
teardown ----------------------------
   [2020-06-20T23:26:16.964Z] INFO     root:conftest.py:210 
np/mx/python random seeds are set to 1481650552, use MXNET_TEST_SEED=1481650552 
to reproduce.
   [2020-06-20T23:26:16.964Z] _____________________________ test_np_random_beta 
_____________________________
   [2020-06-20T23:26:16.964Z] [gw3] win32 -- Python 3.7.3 C:\Python37\python.exe
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z]     @with_seed()
   [2020-06-20T23:26:16.964Z]     @use_np
   [2020-06-20T23:26:16.964Z]     def test_np_random_beta():
   [2020-06-20T23:26:16.964Z]         class TestRandomBeta(HybridBlock):
   [2020-06-20T23:26:16.964Z]             def __init__(self, size=None, 
dtype=None, ctx=None):
   [2020-06-20T23:26:16.964Z]                 super(TestRandomBeta, 
self).__init__()
   [2020-06-20T23:26:16.964Z]                 self._size = size
   [2020-06-20T23:26:16.964Z]                 self._dtype = dtype
   [2020-06-20T23:26:16.964Z]                 self._ctx = ctx
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]             def hybrid_forward(self, F, a, b):
   [2020-06-20T23:26:16.964Z]                 return F.np.random.beta(a, b, 
size=self._size, dtype=self._dtype, ctx=self._ctx)
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         def _test_random_beta_range(output):
   [2020-06-20T23:26:16.964Z]             bigger_than_zero = _np.all(output > 0)
   [2020-06-20T23:26:16.964Z]             smaller_than_one = _np.all(output < 1)
   [2020-06-20T23:26:16.964Z]             return bigger_than_zero and 
smaller_than_one
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         shape_list = [(), (1,), (2, 3), (4, 0, 
5), 6, (7, 8), None]
   [2020-06-20T23:26:16.964Z]         # since fp16 might incur precision issue, 
the corresponding test is skipped
   [2020-06-20T23:26:16.964Z]         dtype_list = [np.float32, np.float64]
   [2020-06-20T23:26:16.964Z]         hybridize_list = [False, True]
   [2020-06-20T23:26:16.964Z]         data = np.array([1])
   [2020-06-20T23:26:16.964Z]         for [param_shape, in_dtype, out_dtype, 
hybridize] in itertools.product(shape_list,
   [2020-06-20T23:26:16.964Z]                 dtype_list, dtype_list, 
hybridize_list):
   [2020-06-20T23:26:16.964Z]             mx_data = data.astype(in_dtype)
   [2020-06-20T23:26:16.964Z]             np_data = mx_data.asnumpy()
   [2020-06-20T23:26:16.964Z]             test_random_beta = 
TestRandomBeta(size=param_shape, dtype=out_dtype)
   [2020-06-20T23:26:16.964Z]             if hybridize:
   [2020-06-20T23:26:16.964Z]                 test_random_beta.hybridize()
   [2020-06-20T23:26:16.964Z] >           np_out = _np.random.beta(np_data, 
np_data, size=param_shape)
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] tests\python\unittest\test_numpy_op.py:4786: 
   [2020-06-20T23:26:16.964Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   [2020-06-20T23:26:16.964Z] mtrand.pyx:478: in 
numpy.random.mtrand.RandomState.beta
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _common.pyx:541: in numpy.random._common.cont
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _common.pyx:459: in 
numpy.random._common.cont_broadcast_2
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] >   ???
   [2020-06-20T23:26:16.964Z] E   ValueError: Output size () is not compatible 
with broadcast dimensions of inputs (1,).
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] _common.pyx:229: ValueError
   [2020-06-20T23:26:16.964Z] ----------------------------- Captured log setup 
------------------------------
   [2020-06-20T23:26:16.964Z] DEBUG    root:conftest.py:193 
np/mx/python random seeds are set to 404557395, use MXNET_TEST_SEED=404557395 
to reproduce.
   [2020-06-20T23:26:16.964Z] ---------------------------- Captured stderr call 
-----------------------------
   [2020-06-20T23:26:16.964Z] [DEBUG] Setting test np/mx/python random seeds, 
use MXNET_TEST_SEED=1213699728 to reproduce.
   [2020-06-20T23:26:16.964Z] [INFO] Setting test np/mx/python random seeds, 
use MXNET_TEST_SEED=1213699728 to reproduce.
   [2020-06-20T23:26:16.964Z] ------------------------------ Captured log call 
------------------------------
   [2020-06-20T23:26:16.964Z] DEBUG    common:common.py:221 Setting 
test np/mx/python random seeds, use MXNET_TEST_SEED=1213699728 to reproduce.
   [2020-06-20T23:26:16.964Z] INFO     common:common.py:227 Setting 
test np/mx/python random seeds, use MXNET_TEST_SEED=1213699728 to reproduce.
   [2020-06-20T23:26:16.964Z] ---------------------------- Captured log 
teardown ----------------------------
   [2020-06-20T23:26:16.964Z] INFO     root:conftest.py:210 
np/mx/python random seeds are set to 404557395, use MXNET_TEST_SEED=404557395 
to reproduce.
   [2020-06-20T23:26:16.964Z] ______________________________ test_np_random_f 
_______________________________
   [2020-06-20T23:26:16.964Z] [gw3] win32 -- Python 3.7.3 C:\Python37\python.exe
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z]     @with_seed()
   [2020-06-20T23:26:16.964Z]     @use_np
   [2020-06-20T23:26:16.964Z]     def test_np_random_f():
   [2020-06-20T23:26:16.964Z]         class TestRandomF(HybridBlock):
   [2020-06-20T23:26:16.964Z]             def __init__(self, size=None):
   [2020-06-20T23:26:16.964Z]                 super(TestRandomF, 
self).__init__()
   [2020-06-20T23:26:16.964Z]                 self._size = size
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]             def hybrid_forward(self, F, dfnum, 
dfden):
   [2020-06-20T23:26:16.964Z]                 return F.np.random.f(dfnum, 
dfden, size=self._size)
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         shape_list = [(), (1,), (2, 3), (4, 0, 
5), 6, (7, 8), None]
   [2020-06-20T23:26:16.964Z]         hybridize_list = [False, True]
   [2020-06-20T23:26:16.964Z]         df = np.array([1])
   [2020-06-20T23:26:16.964Z]         for [param_shape, hybridize] in 
itertools.product(shape_list,
   [2020-06-20T23:26:16.964Z]              hybridize_list):
   [2020-06-20T23:26:16.964Z]             if sys.version_info.major < 3 and 
param_shape == ():
   [2020-06-20T23:26:16.964Z]                 continue
   [2020-06-20T23:26:16.964Z]             mx_df = df
   [2020-06-20T23:26:16.964Z]             np_df = mx_df.asnumpy()
   [2020-06-20T23:26:16.964Z]             test_random_f = 
TestRandomF(size=param_shape)
   [2020-06-20T23:26:16.964Z]             if hybridize:
   [2020-06-20T23:26:16.964Z]                 test_random_f.hybridize()
   [2020-06-20T23:26:16.964Z] >           np_out = _np.random.f(np_df, np_df, 
size=param_shape)
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] tests\python\unittest\test_numpy_op.py:4823: 
   [2020-06-20T23:26:16.964Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   [2020-06-20T23:26:16.964Z] mtrand.pyx:1753: in 
numpy.random.mtrand.RandomState.f
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _common.pyx:541: in numpy.random._common.cont
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _common.pyx:459: in 
numpy.random._common.cont_broadcast_2
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] >   ???
   [2020-06-20T23:26:16.964Z] E   ValueError: Output size () is not compatible 
with broadcast dimensions of inputs (1,).
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] _common.pyx:229: ValueError
   [2020-06-20T23:26:16.964Z] ----------------------------- Captured log setup 
------------------------------
   [2020-06-20T23:26:16.964Z] DEBUG    root:conftest.py:193 
np/mx/python random seeds are set to 364715442, use MXNET_TEST_SEED=364715442 
to reproduce.
   [2020-06-20T23:26:16.964Z] ---------------------------- Captured stderr call 
-----------------------------
   [2020-06-20T23:26:16.964Z] [DEBUG] Setting test np/mx/python random seeds, 
use MXNET_TEST_SEED=867177126 to reproduce.
   [2020-06-20T23:26:16.964Z] [INFO] Setting test np/mx/python random seeds, 
use MXNET_TEST_SEED=867177126 to reproduce.
   [2020-06-20T23:26:16.964Z] ------------------------------ Captured log call 
------------------------------
   [2020-06-20T23:26:16.964Z] DEBUG    common:common.py:221 Setting 
test np/mx/python random seeds, use MXNET_TEST_SEED=867177126 to reproduce.
   [2020-06-20T23:26:16.964Z] INFO     common:common.py:227 Setting 
test np/mx/python random seeds, use MXNET_TEST_SEED=867177126 to reproduce.
   [2020-06-20T23:26:16.964Z] ---------------------------- Captured log 
teardown ----------------------------
   [2020-06-20T23:26:16.964Z] INFO     root:conftest.py:210 
np/mx/python random seeds are set to 364715442, use MXNET_TEST_SEED=364715442 
to reproduce.
   [2020-06-20T23:26:16.964Z] __________________________ 
test_np_random_chisquare ___________________________
   [2020-06-20T23:26:16.964Z] [gw3] win32 -- Python 3.7.3 C:\Python37\python.exe
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z]     @with_seed()
   [2020-06-20T23:26:16.964Z]     @use_np
   [2020-06-20T23:26:16.964Z]     def test_np_random_chisquare():
   [2020-06-20T23:26:16.964Z]         class TestRandomChisquare(HybridBlock):
   [2020-06-20T23:26:16.964Z]             def __init__(self, size=None, 
dtype=None, ctx=None):
   [2020-06-20T23:26:16.964Z]                 super(TestRandomChisquare, 
self).__init__()
   [2020-06-20T23:26:16.964Z]                 self._size = size
   [2020-06-20T23:26:16.964Z]                 self._dtype = dtype
   [2020-06-20T23:26:16.964Z]                 self._ctx = ctx
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]             def hybrid_forward(self, F, df):
   [2020-06-20T23:26:16.964Z]                 return F.np.random.chisquare(df, 
size=self._size, dtype=self._dtype, ctx=self._ctx)
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         shape_list = [(), (1,), (2, 3), (4, 0, 
5), 6, (7, 8), None]
   [2020-06-20T23:26:16.964Z]     
   [2020-06-20T23:26:16.964Z]         dtype_list = [np.float16, np.float32, 
np.float64]
   [2020-06-20T23:26:16.964Z]         hybridize_list = [False, True]
   [2020-06-20T23:26:16.964Z]         df = np.array([1])
   [2020-06-20T23:26:16.964Z]         for [param_shape, in_dtype, out_dtype, 
hybridize] in itertools.product(shape_list,
   [2020-06-20T23:26:16.964Z]                 dtype_list, dtype_list, 
hybridize_list):
   [2020-06-20T23:26:16.964Z]             if sys.version_info.major < 3 and 
param_shape == ():
   [2020-06-20T23:26:16.964Z]                 continue
   [2020-06-20T23:26:16.964Z]             mx_df = df.astype(in_dtype)
   [2020-06-20T23:26:16.964Z]             np_df = mx_df.asnumpy()
   [2020-06-20T23:26:16.964Z]             test_random_chisquare = 
TestRandomChisquare(size=param_shape, dtype=out_dtype)
   [2020-06-20T23:26:16.964Z]             if hybridize:
   [2020-06-20T23:26:16.964Z]                 test_random_chisquare.hybridize()
   [2020-06-20T23:26:16.964Z] >           np_out = _np.random.chisquare(np_df, 
size=param_shape)
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] tests\python\unittest\test_numpy_op.py:4858: 
   [2020-06-20T23:26:16.964Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   [2020-06-20T23:26:16.964Z] mtrand.pyx:1913: in 
numpy.random.mtrand.RandomState.chisquare
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _common.pyx:537: in numpy.random._common.cont
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _common.pyx:421: in 
numpy.random._common.cont_broadcast_1
   [2020-06-20T23:26:16.964Z]     ???
   [2020-06-20T23:26:16.964Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] >   ???
   [2020-06-20T23:26:16.964Z] E   ValueError: Output size () is not compatible 
with broadcast dimensions of inputs (1,).
   [2020-06-20T23:26:16.964Z] 
   [2020-06-20T23:26:16.964Z] _common.pyx:229: ValueError
   [2020-06-20T23:26:16.964Z] 
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to