def _test_autocast_numpy():
 assert (config.cast_policy == 'numpy')
 def ok(z):
  assert (tensor.constant(z).dtype == numpy.asarray(z).dtype)
 for x in (([(2 ** i) for i in xrange(63)] + [0, L(0), L(1), L(((2 ** 63) - 1))]) + [0.0, 1.0, 1.1, 1.5]):
  n_x = numpy.asarray(x)
  ok(x)
  ok((- x))
  ok((x - 1))
  ok(((- x) + 1))
  ok(n_x)

def _test_autocast_numpy ( ) : assert ( config . cast_policy == 'numpy' ) def ok ( z ) : assert ( tensor . constant ( z ) . dtype == numpy . asarray ( z ) . dtype ) for x in ( ( [ ( 2 ** i ) for i in xrange ( 63 ) ] + [ 0 , L ( 0 ) , L ( 1 ) , L ( ( ( 2 ** 63 ) - 1 ) ) ] ) + [ 0.0 , 1.0 , 1.1 , 1.5 ] ) : n_x = numpy . asarray ( x ) ok ( x ) ok ( ( - x ) ) ok ( ( x - 1 ) ) ok ( ( ( - x ) + 1 ) ) ok ( n_x )
called from test_autocast .