提交 82ca7c85 authored 作者: Frederic Bastien's avatar Frederic Bastien

add elemwise test for complex64 and complex128.

上级 4b96ed56
...@@ -197,6 +197,7 @@ def makeTester(name, op, expected, checks = {}, good = {}, bad_build = {}, bad_r ...@@ -197,6 +197,7 @@ def makeTester(name, op, expected, checks = {}, good = {}, bad_build = {}, bad_r
rand = lambda *shape: 2 * numpy.asarray(numpy.random.rand(*shape), dtype=config.floatX) - 1 rand = lambda *shape: 2 * numpy.asarray(numpy.random.rand(*shape), dtype=config.floatX) - 1
randint = lambda *shape: numpy.random.random_integers(-5, 5, shape) randint = lambda *shape: numpy.random.random_integers(-5, 5, shape)
randcomplex = lambda *shape: numpy.complex128(2 * numpy.asarray(numpy.random.rand(*shape), dtype=config.floatX) - 1)
def randint_nonzero(*shape): def randint_nonzero(*shape):
r = numpy.random.random_integers(-5, 4, shape) r = numpy.random.random_integers(-5, 4, shape)
...@@ -208,6 +209,8 @@ def rand_ranged(min, max, shape): ...@@ -208,6 +209,8 @@ def rand_ranged(min, max, shape):
def randint_ranged(min, max, shape): def randint_ranged(min, max, shape):
return numpy.random.random_integers(min, max, shape) return numpy.random.random_integers(min, max, shape)
def randc128_ranged(min, max, shape):
return numpy.asarray(numpy.random.rand(*shape) * (max - min) + min, dtype='complex128')
def makeBroadcastTester(op, expected, checks = {}, **kwargs): def makeBroadcastTester(op, expected, checks = {}, **kwargs):
name = str(op) + "Tester" name = str(op) + "Tester"
...@@ -234,6 +237,10 @@ _good_broadcast_binary_normal = dict(same_shapes = (rand(2, 3), rand(2, 3)), ...@@ -234,6 +237,10 @@ _good_broadcast_binary_normal = dict(same_shapes = (rand(2, 3), rand(2, 3)),
integers = (randint(2, 3), randint(2, 3)), integers = (randint(2, 3), randint(2, 3)),
dtype_mixup_1 = (rand(2, 3), randint(2, 3)), dtype_mixup_1 = (rand(2, 3), randint(2, 3)),
dtype_mixup_2 = (randint(2, 3), rand(2, 3)), dtype_mixup_2 = (randint(2, 3), rand(2, 3)),
complex1 = (randcomplex(2,3),randcomplex(2,3)),
complex2 = (randcomplex(2,3),rand(2,3)),
# Disabled as we test the case where we reuse the same output as the first inputs.
# complex3 = (rand(2,3),randcomplex(2,3)),
empty = (numpy.asarray([]),numpy.asarray([1])), empty = (numpy.asarray([]),numpy.asarray([1])),
) )
...@@ -248,6 +255,10 @@ _grad_broadcast_binary_normal = dict(same_shapes = (rand(2, 3), rand(2, 3)), ...@@ -248,6 +255,10 @@ _grad_broadcast_binary_normal = dict(same_shapes = (rand(2, 3), rand(2, 3)),
column = (rand(2, 3), rand(2, 1)), column = (rand(2, 3), rand(2, 1)),
#This don't work as verify grad don't support that #This don't work as verify grad don't support that
#empty = (numpy.asarray([]), numpy.asarray([1])) #empty = (numpy.asarray([]), numpy.asarray([1]))
#complex1 = (randcomplex(2,3),randcomplex(2,3)),
#complex2 = (randcomplex(2,3),rand(2,3)),
# Disabled as we test the case where we reuse the same output as the first inputs.
#complex3 = (rand(2,3),randcomplex(2,3)),
) )
...@@ -338,6 +349,9 @@ _good_broadcast_div_mod_normal_float_inplace = dict(same_shapes = (rand(2, 3), r ...@@ -338,6 +349,9 @@ _good_broadcast_div_mod_normal_float_inplace = dict(same_shapes = (rand(2, 3), r
dtype_mixup_2 = (randint_nonzero(2, 3), rand(2, 3)), dtype_mixup_2 = (randint_nonzero(2, 3), rand(2, 3)),
#integers_positive = (randint_ranged(4, 10, (2, 3)), randint_ranged(1, 6, (2, 3))), #integers_positive = (randint_ranged(4, 10, (2, 3)), randint_ranged(1, 6, (2, 3))),
#integers_known_to_fail = (numpy.array(-1), numpy.array(5)) #integers_known_to_fail = (numpy.array(-1), numpy.array(5))
complex1 = (randcomplex(2,3),randcomplex(2,3)),
complex2 = (randcomplex(2,3),rand(2,3)),
#complex3 = (rand(2,3),randcomplex(2,3)),# Inplace on the first element. Must have the same type.
empty1 = (numpy.asarray([]), numpy.asarray([1])), empty1 = (numpy.asarray([]), numpy.asarray([1])),
#empty2 = (numpy.asarray([0]), numpy.asarray([])), #empty2 = (numpy.asarray([0]), numpy.asarray([])),
) )
...@@ -348,6 +362,11 @@ _grad_broadcast_div_mod_normal = dict(same_shapes = (rand(2, 3), rand(2, 3)), ...@@ -348,6 +362,11 @@ _grad_broadcast_div_mod_normal = dict(same_shapes = (rand(2, 3), rand(2, 3)),
scalar = (rand(2, 3), rand(1, 1)), scalar = (rand(2, 3), rand(1, 1)),
row = (rand(2, 3), rand(1, 3)), row = (rand(2, 3), rand(1, 3)),
column = (rand(2, 3), rand(2, 1)), column = (rand(2, 3), rand(2, 1)),
#complex1 = (randcomplex(2,3),randcomplex(2,3)),
#complex2 = (randcomplex(2,3),rand(2,3)),
#complex3 = (rand(2,3),randcomplex(2,3)),
#dtype_mixup_1 = (rand(2, 3), randint_nonzero(2, 3)),
#dtype_mixup_2 = (randint_nonzero(2, 3), rand(2, 3)),
#empty1 = (numpy.asarray([]), numpy.asarray([1.])), #empty1 = (numpy.asarray([]), numpy.asarray([1.])),
#empty2 = (numpy.asarray([0]), numpy.asarray([])), #empty2 = (numpy.asarray([0]), numpy.asarray([])),
) )
...@@ -374,14 +393,14 @@ DivInplaceTester = makeBroadcastTester(op = inplace.true_div_inplace, ...@@ -374,14 +393,14 @@ DivInplaceTester = makeBroadcastTester(op = inplace.true_div_inplace,
inplace = True) inplace = True)
ModTester = makeBroadcastTester(op = mod, ModTester = makeBroadcastTester(op = mod,
expected = lambda x, y: x % y, expected = lambda x, y: numpy.asarray(x % y, dtype=theano.scalar.basic.upcast(x.dtype, y.dtype)),
good = _good_broadcast_div_mod_normal_float, good = _good_broadcast_div_mod_normal_float,
# integers = (randint(2, 3), randint_nonzero(2, 3)), # integers = (randint(2, 3), randint_nonzero(2, 3)),
# dtype_mixup_1 = (rand(2, 3), randint_nonzero(2, 3)), # dtype_mixup_1 = (rand(2, 3), randint_nonzero(2, 3)),
# dtype_mixup_2 = (randint_nonzero(2, 3), rand(2, 3))), # dtype_mixup_2 = (randint_nonzero(2, 3), rand(2, 3))),
) )
ModInplaceTester = makeBroadcastTester(op = inplace.mod_inplace, ModInplaceTester = makeBroadcastTester(op = inplace.mod_inplace,
expected = lambda x, y: x % y, expected = lambda x, y: numpy.asarray(x % y, dtype=theano.scalar.basic.upcast(x.dtype, y.dtype)),
good = _good_broadcast_div_mod_normal_float_inplace, good = _good_broadcast_div_mod_normal_float_inplace,
inplace = True) inplace = True)
...@@ -390,12 +409,18 @@ _good_broadcast_pow_normal_float = dict(same_shapes = (rand_ranged(1, 5, (2, 3)) ...@@ -390,12 +409,18 @@ _good_broadcast_pow_normal_float = dict(same_shapes = (rand_ranged(1, 5, (2, 3))
row = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (1, 3))), row = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (1, 3))),
column = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (2, 1))), column = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (2, 1))),
dtype_mixup = (rand_ranged(-3, 3, (2, 3)), randint_ranged(-3, 3, (2, 3))), dtype_mixup = (rand_ranged(-3, 3, (2, 3)), randint_ranged(-3, 3, (2, 3))),
complex1 = (randcomplex(2,3),randcomplex(2,3)),
complex2 = (randcomplex(2,3),rand(2,3)),
#complex3 = (rand(2,3),randcomplex(2,3)), # Inplace on the first element.
empty1 = (numpy.asarray([]), numpy.asarray([1])), empty1 = (numpy.asarray([]), numpy.asarray([1])),
empty2 = (numpy.asarray([0]), numpy.asarray([])),) empty2 = (numpy.asarray([0]), numpy.asarray([])),)
_grad_broadcast_pow_normal = dict(same_shapes = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (2, 3))), _grad_broadcast_pow_normal = dict(same_shapes = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (2, 3))),
scalar = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (1, 1))), scalar = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (1, 1))),
row = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (1, 3))), row = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (1, 3))),
column = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (2, 1))), column = (rand_ranged(1, 5, (2, 3)), rand_ranged(-3, 3, (2, 1))),
#complex1 = (randcomplex(2,3),randcomplex(2,3)),
#complex2 = (randcomplex(2,3),rand(2,3)),
#complex3 = (rand(2,3),randcomplex(2,3)),
#empty1 = (numpy.asarray([]), numpy.asarray([1])), #empty1 = (numpy.asarray([]), numpy.asarray([1])),
#empty2 = (numpy.asarray([0]), numpy.asarray([])), #empty2 = (numpy.asarray([0]), numpy.asarray([])),
) )
...@@ -420,18 +445,31 @@ corner_case = numpy.asarray([-2.5, -2., -1.5, -1., -0.5, -.51, -.49, 0, 0.49, 0. ...@@ -420,18 +445,31 @@ corner_case = numpy.asarray([-2.5, -2., -1.5, -1., -0.5, -.51, -.49, 0, 0.49, 0.
corner_case_grad = numpy.asarray([-2.5, -2., -1.5, -1., -0.5, -.51, -.49, 0.49, 0.5, 0.9, 1, 1.5, 2, 2.5], dtype=config.floatX) corner_case_grad = numpy.asarray([-2.5, -2., -1.5, -1., -0.5, -.51, -.49, 0.49, 0.5, 0.9, 1, 1.5, 2, 2.5], dtype=config.floatX)
_good_broadcast_unary_normal_float = dict(normal = (rand_ranged(-5, 5, (2, 3)),), _good_broadcast_unary_normal_float = dict(normal = (rand_ranged(-5, 5, (2, 3)),),
corner_case = (corner_case,), corner_case = (corner_case,),
complex = (randcomplex(2,3),),
empty = (numpy.asarray([]),)) empty = (numpy.asarray([]),))
_good_broadcast_unary_normal_float_no_empty = copy(_good_broadcast_unary_normal_float) _good_broadcast_unary_normal_float_no_empty = copy(_good_broadcast_unary_normal_float)
del _good_broadcast_unary_normal_float_no_empty['empty'] del _good_broadcast_unary_normal_float_no_empty['empty']
_good_broadcast_unary_normal_float_no_empty_no_complex = copy(_good_broadcast_unary_normal_float_no_empty)
del _good_broadcast_unary_normal_float_no_empty_no_complex['complex']
_good_broadcast_unary_normal_float_no_complex = copy(_good_broadcast_unary_normal_float)
del _good_broadcast_unary_normal_float_no_complex['complex']
_good_broadcast_unary_normal = dict(normal = (numpy.asarray(rand_ranged(-5, 5, (2, 3)),dtype=config.floatX),), _good_broadcast_unary_normal = dict(normal = (numpy.asarray(rand_ranged(-5, 5, (2, 3)),dtype=config.floatX),),
integers = (randint_ranged(-5, 5, (2, 3)),), integers = (randint_ranged(-5, 5, (2, 3)),),
corner_case = (corner_case,), corner_case = (corner_case,),
complex = (randcomplex(2,3),),
empty = (numpy.asarray([]),))
_good_broadcast_unary_normal_no_complex = dict(normal = (numpy.asarray(rand_ranged(-5, 5, (2, 3)),dtype=config.floatX),),
integers = (randint_ranged(-5, 5, (2, 3)),),
corner_case = (corner_case,),
#complex = (randcomplex(2,3),),
empty = (numpy.asarray([]),)) empty = (numpy.asarray([]),))
_grad_broadcast_unary_normal = dict(normal = (numpy.asarray(rand_ranged(-5, 5, (2, 3)),dtype=config.floatX),), _grad_broadcast_unary_normal = dict(normal = (numpy.asarray(rand_ranged(-5, 5, (2, 3)),dtype=config.floatX),),
corner_case = (corner_case_grad,), corner_case = (corner_case_grad,),
#complex = (randcomplex(2,3),),
#empty = (numpy.asarray([]),) #empty = (numpy.asarray([]),)
) )
...@@ -441,9 +479,12 @@ AbsTester = makeBroadcastTester(op = tensor.abs_, ...@@ -441,9 +479,12 @@ AbsTester = makeBroadcastTester(op = tensor.abs_,
expected = lambda x: abs(x), expected = lambda x: abs(x),
good = _good_broadcast_unary_normal, good = _good_broadcast_unary_normal,
grad = _grad_broadcast_unary_normal) grad = _grad_broadcast_unary_normal)
_good_broadcast_unary_normal_abs = copy(_good_broadcast_unary_normal)
# Can't do inplace on Abs as the input/output are not of the same type!
del _good_broadcast_unary_normal_abs['complex']
AbsInplaceTester = makeBroadcastTester(op = inplace.abs__inplace, AbsInplaceTester = makeBroadcastTester(op = inplace.abs__inplace,
expected = lambda x: numpy.abs(x), expected = lambda x: numpy.abs(x),
good = _good_broadcast_unary_normal, good = _good_broadcast_unary_normal_abs,
grad = _grad_broadcast_unary_normal, grad = _grad_broadcast_unary_normal,
inplace = True) inplace = True)
...@@ -459,32 +500,37 @@ NegInplaceTester = makeBroadcastTester(op = inplace.neg_inplace, ...@@ -459,32 +500,37 @@ NegInplaceTester = makeBroadcastTester(op = inplace.neg_inplace,
SgnTester = makeBroadcastTester(op = sgn, SgnTester = makeBroadcastTester(op = sgn,
expected = numpy.sign, expected = numpy.sign,
good = _good_broadcast_unary_normal) good = _good_broadcast_unary_normal_no_complex,
grad = _grad_broadcast_unary_normal,)
SgnInplaceTester = makeBroadcastTester(op = inplace.sgn_inplace, SgnInplaceTester = makeBroadcastTester(op = inplace.sgn_inplace,
expected = numpy.sign, expected = numpy.sign,
good = _good_broadcast_unary_normal, good = _good_broadcast_unary_normal_no_complex,
grad = _grad_broadcast_unary_normal,
inplace = True) inplace = True)
CeilTester = makeBroadcastTester(op = ceil, CeilTester = makeBroadcastTester(op = ceil,
expected = lambda a: numpy.asarray(numpy.ceil(a),a.dtype), expected = lambda a: numpy.asarray(numpy.ceil(a),a.dtype),
good = _good_broadcast_unary_normal) good = _good_broadcast_unary_normal_no_complex,
grad = _grad_broadcast_unary_normal)
CeilInplaceTester = makeBroadcastTester(op = inplace.ceil_inplace, CeilInplaceTester = makeBroadcastTester(op = inplace.ceil_inplace,
expected = lambda a: numpy.asarray(numpy.ceil(a),a.dtype), expected = lambda a: numpy.asarray(numpy.ceil(a),a.dtype),
good = _good_broadcast_unary_normal, good = _good_broadcast_unary_normal_no_complex,
grad = _grad_broadcast_unary_normal,
inplace = True) inplace = True)
FloorTester = makeBroadcastTester(op = floor, FloorTester = makeBroadcastTester(op = floor,
expected = lambda a: numpy.asarray(numpy.floor(a),a.dtype), expected = lambda a: numpy.asarray(numpy.floor(a),a.dtype),
good = _good_broadcast_unary_normal, good = _good_broadcast_unary_normal_no_complex,
grad = _grad_broadcast_unary_normal) grad = _grad_broadcast_unary_normal)
FloorInplaceTester = makeBroadcastTester(op = inplace.floor_inplace, FloorInplaceTester = makeBroadcastTester(op = inplace.floor_inplace,
expected = lambda a: numpy.asarray(numpy.floor(a),a.dtype), expected = lambda a: numpy.asarray(numpy.floor(a),a.dtype),
good = _good_broadcast_unary_normal, good = _good_broadcast_unary_normal_no_complex,
grad = _grad_broadcast_unary_normal, grad = _grad_broadcast_unary_normal,
inplace = True) inplace = True)
RoundHalfToEvenTester = makeBroadcastTester(op = round_half_to_even, RoundHalfToEvenTester = makeBroadcastTester(op = round_half_to_even,
expected = numpy.round, expected = numpy.round,
good = _good_broadcast_unary_normal_float) good = _good_broadcast_unary_normal_float_no_complex)
# TODO: Why complex are accepted in the next one?
RoundHalfToEvenInplaceTester = makeBroadcastTester(op = inplace.round_half_to_even_inplace, RoundHalfToEvenInplaceTester = makeBroadcastTester(op = inplace.round_half_to_even_inplace,
expected = numpy.round, expected = numpy.round,
good = _good_broadcast_unary_normal_float, good = _good_broadcast_unary_normal_float,
...@@ -495,10 +541,10 @@ RoundHalfToEvenInplaceTester = makeBroadcastTester(op = inplace.round_half_to_ev ...@@ -495,10 +541,10 @@ RoundHalfToEvenInplaceTester = makeBroadcastTester(op = inplace.round_half_to_ev
#This happen in float32 mode. #This happen in float32 mode.
RoundHalfAwayFromZeroTester = makeBroadcastTester(op = round_half_away_from_zero, RoundHalfAwayFromZeroTester = makeBroadcastTester(op = round_half_away_from_zero,
expected = theano.scalar.basic.round_half_away_from_zero_vec, expected = theano.scalar.basic.round_half_away_from_zero_vec,
good = _good_broadcast_unary_normal_float_no_empty)#_good_broadcast_unary_normal_float) good = _good_broadcast_unary_normal_float_no_empty_no_complex)#_good_broadcast_unary_normal_float)
RoundHalfAwayFromZeroInplaceTester = makeBroadcastTester(op = inplace.round_half_away_from_zero_inplace, RoundHalfAwayFromZeroInplaceTester = makeBroadcastTester(op = inplace.round_half_away_from_zero_inplace,
expected = theano.scalar.basic.round_half_away_from_zero_vec, expected = theano.scalar.basic.round_half_away_from_zero_vec,
good = _good_broadcast_unary_normal_float_no_empty, good = _good_broadcast_unary_normal_float_no_empty_no_complex,
inplace = True) inplace = True)
SqrTester = makeBroadcastTester(op = sqr, SqrTester = makeBroadcastTester(op = sqr,
...@@ -524,10 +570,12 @@ ExpInplaceTester = makeBroadcastTester(op = inplace.exp_inplace, ...@@ -524,10 +570,12 @@ ExpInplaceTester = makeBroadcastTester(op = inplace.exp_inplace,
_good_broadcast_unary_positive = dict(normal = (rand_ranged(0.001, 5, (2, 3)),), _good_broadcast_unary_positive = dict(normal = (rand_ranged(0.001, 5, (2, 3)),),
integers = (randint_ranged(1, 5, (2, 3)),), integers = (randint_ranged(1, 5, (2, 3)),),
complex = (randc128_ranged(1, 5, (2,3)),),
empty = (numpy.asarray([]),), empty = (numpy.asarray([]),),
) )
_grad_broadcast_unary_positive = dict(normal = (rand_ranged(0.001, 5, (2, 3)),), _grad_broadcast_unary_positive = dict(normal = (rand_ranged(0.001, 5, (2, 3)),),
#complex = (randc128_ranged(1, 5, (2,3)),),
#empty = (numpy.asarray([]),), #empty = (numpy.asarray([]),),
) )
...@@ -586,9 +634,11 @@ SqrtInplaceTester = makeBroadcastTester(op = inplace.sqrt_inplace, ...@@ -586,9 +634,11 @@ SqrtInplaceTester = makeBroadcastTester(op = inplace.sqrt_inplace,
_good_broadcast_unary_wide = dict(normal = (rand_ranged(-1000, 1000, (2, 3)),), _good_broadcast_unary_wide = dict(normal = (rand_ranged(-1000, 1000, (2, 3)),),
integers = (randint_ranged(-1000, 1000, (2, 3)),), integers = (randint_ranged(-1000, 1000, (2, 3)),),
complex = (randc128_ranged(-1000, 1000, (2, 3)),),
empty = (numpy.asarray([]),),) empty = (numpy.asarray([]),),)
_grad_broadcast_unary_wide = dict(normal = (rand_ranged(-1000, 1000, (2, 3)),), _grad_broadcast_unary_wide = dict(normal = (rand_ranged(-1000, 1000, (2, 3)),),
#complex = (randc128_ranged(-1000, 1000, (2, 3)),),
#empty = (numpy.asarray([]),), #empty = (numpy.asarray([]),),
) )
...@@ -667,6 +717,8 @@ TanhInplaceTester = makeBroadcastTester(op = inplace.tanh_inplace, ...@@ -667,6 +717,8 @@ TanhInplaceTester = makeBroadcastTester(op = inplace.tanh_inplace,
#inplace ops when the input is integer and the output is float* #inplace ops when the input is integer and the output is float*
# don't have a well defined behavior. We don't test that case. # don't have a well defined behavior. We don't test that case.
_good_broadcast_unary_normal_no_int_no_complex = _good_broadcast_unary_normal_no_complex.copy()
del _good_broadcast_unary_normal_no_int_no_complex['integers']
_good_broadcast_unary_normal_no_int = _good_broadcast_unary_normal.copy() _good_broadcast_unary_normal_no_int = _good_broadcast_unary_normal.copy()
del _good_broadcast_unary_normal_no_int['integers'] del _good_broadcast_unary_normal_no_int['integers']
...@@ -712,13 +764,13 @@ else: ...@@ -712,13 +764,13 @@ else:
empty = (numpy.asarray([]),),) empty = (numpy.asarray([]),),)
ErfcTester = makeBroadcastTester(op = erfc, ErfcTester = makeBroadcastTester(op = erfc,
expected = expected, expected = expected,
good = _good_broadcast_unary_normal, good = _good_broadcast_unary_normal_no_int_no_complex,
grad = _grad_broadcast_unary_normal, grad = _grad_broadcast_unary_normal,
eps = 2e-10, eps = 2e-10,
mode = mode_no_scipy) mode = mode_no_scipy)
ErfcInplaceTester = makeBroadcastTester(op = inplace.erfc_inplace, ErfcInplaceTester = makeBroadcastTester(op = inplace.erfc_inplace,
expected = expected, expected = expected,
good = _good_broadcast_unary_normal_no_int, good = _good_broadcast_unary_normal_no_int_no_complex,
grad = _grad_broadcast_unary_normal, grad = _grad_broadcast_unary_normal,
eps = 2e-10, eps = 2e-10,
mode = mode_no_scipy, mode = mode_no_scipy,
...@@ -732,6 +784,9 @@ DotTester = makeTester(name = 'DotTester', ...@@ -732,6 +784,9 @@ DotTester = makeTester(name = 'DotTester',
good = dict(correct1 = (rand(5, 7), rand(7, 5)), good = dict(correct1 = (rand(5, 7), rand(7, 5)),
correct2 = (rand(5, 7), rand(7, 9)), correct2 = (rand(5, 7), rand(7, 9)),
correct3 = (rand(5, 7), rand(7)), correct3 = (rand(5, 7), rand(7)),
complex1 = (randcomplex(5, 7), randcomplex(7)),
complex2 = (rand(5, 7), randcomplex(7)),
complex3 = (randcomplex(5, 7), rand(7)),
empty = (numpy.asarray([]),numpy.asarray([])),), empty = (numpy.asarray([]),numpy.asarray([])),),
bad_build = dict(), bad_build = dict(),
bad_runtime = dict(bad1 = (rand(5, 7), rand(5, 7)), bad_runtime = dict(bad1 = (rand(5, 7), rand(5, 7)),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论