code: def test_basic():
      def check_elementwise():
          a = nd.ones(shape=(LARGE_X, SMALL_Y))
          b = nd.ones(shape=(LARGE_X, SMALL_Y))
          res = a + b
          assert np.sum(res[-1].asnumpy() == 2) == a.shape[1]
          res = a + 1
          assert np.sum(res[-1].asnumpy() == 2) == a.shape[1]
          res = nd.sqrt(a + 3)
          assert np.sum(res[-1].asnumpy() == 2) == a.shape[1]
  
      def check_reduce():
          a = nd.ones(shape=(LARGE_X, SMALL_Y))
          assert nd.sum(a).asnumpy() == a.shape[0] * a.shape[1]
  
      def check_dot():
          a = nd.ones(shape=(LARGE_X, SMALL_Y))
          b = nd.ones(shape=(SMALL_Y, SMALL_Y))
          res = nd.dot(a, b)
          assert np.sum(res[-1].asnumpy() == SMALL_Y) == b.shape[1]
  
      def check_argmin():
          a = nd.arange(0, LARGE_X * SMALL_Y).reshape(LARGE_X, SMALL_Y)
          idx = mx.nd.argmin(a, axis=0)
          assert idx.shape[0] == SMALL_Y
  
      @pytest.mark.skip(
          reason="Memory doesn't free up after stacked execution with other ops, "
          + "tracked at https://github.com/apache/mxnet/issues/17411"
      )
      def check_argsort():
          b = create_2d_tensor(rows=LARGE_X, columns=SMALL_Y)
          s = nd.argsort(b, axis=0, is_ascend=False, dtype=np.int64)
          mx.nd.waitall()
          assert (s[0].asnumpy() == (LARGE_X - 1)).all()
  
      @pytest.mark.skip(
          reason="Memory doesn't free up after stacked execution with other ops, "
          + "tracked at https://github.com/apache/mxnet/issues/17411"
      )
      def check_sort():
          b = create_2d_tensor(rows=LARGE_X, columns=SMALL_Y)
          s = nd.sort(b, axis=0, is_ascend=False)
          assert np.sum(
              s[-1][SMALL_Y // 2 : SMALL_Y].asnumpy() == 0
          ).all()
          s = nd.sort(b, is_ascend=False)
          assert np.sum(s[0].asnumpy() == 0).all()
  
      @pytest.mark.skip(
          reason="Memory doesn't free up after stacked execution with other ops, "
          + "tracked at https://github.com/apache/mxnet/issues/17411"
      )
      def check_topk():
          b = create_2d_tensor(rows=LARGE_X, columns=SMALL_Y)
          k = nd.topk(b, k=10, axis=0, dtype=np.int64)
          assert np.sum(k.asnumpy() == (LARGE_X - 1)) == SMALL_Y
          ind, val = mx.nd.topk(
              b,
              k=3,
              axis=0,
              dtype=np.int64,
              ret_typ="both",
              is_ascend=False,
          )
          assert np.all(ind == val)
          b = create_2d_tensor(rows=SMALL_Y, columns=LARGE_X)
          l = nd.topk(b, k=1, axis=-1, dtype=np.int64, ret_typ="value")
          assert l.sum() == np.sum(np.arange(0, SMALL_Y))
  
      def check_exponent_logarithm_operators():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          # exponent
          result = nd.exp(a)
          assert result[0][-1] == 7.389056
          assert result.shape == a.shape
          # exponent minus 1
          result = nd.expm1(a)
          assert result[0][-1] == 6.389056
          assert result.shape == a.shape
          # log2
          result = nd.log2(a)
          assert result[0][-1] == 1
          assert result.shape == a.shape
          # log10
          result = nd.log10(a)
          assert result[0][-1] == 0.30103
          assert result.shape == a.shape
          # log1p
          result = nd.log1p(a)
          assert result[0][-1] == 1.0986123
          assert result.shape == a.shape
          # log
          result = nd.log(a)
          assert result[0][-1] == 0.6931472
          assert result.shape == a.shape
  
      def check_power_operators():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          # sqrt
          result = nd.sqrt(a)
          assert result[0][-1] == 1.4142135
          assert result.shape == a.shape
          # rsqrt
          result = nd.rsqrt(a)
          assert result[0][-1] == 0.70710677
          assert result.shape == a.shape
          # cbrt
          result = nd.cbrt(a)
          assert result[0][-1] == 1.2599211
          assert result.shape == a.shape
          # rcbrt
          result = nd.rcbrt(a)
          assert result[0][-1] == 0.7937005
          assert result.shape == a.shape
          # square
          result = nd.square(a)
          assert result[0][-1] == 4
          assert result.shape == a.shape
          # reciprocal
          result = nd.reciprocal(a)
          assert result[0][-1] == 0.5
          assert result.shape == a.shape
  
      def check_elemwise_add():
          a = nd.ones(shape=(LARGE_X, SMALL_Y))
          b = nd.ones(shape=(LARGE_X, SMALL_Y))
          res = nd.elemwise_add(a, b)
          assert np.sum(res[-1].asnumpy() == 2) == a.shape[1]
  
      def check_add():
          a = nd.ones(shape=(LARGE_X, SMALL_Y))
          b = nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__add__(a)
          assert c[0][-1] == 2
          assert c.shape == a.shape
  
      def check_sub():
          a = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__sub__(a)
          assert c[0][-1] == -2
          assert c.shape == a.shape
  
      def check_rsub():
          a = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__rsub__(a)
          assert c[0][-1] == 2
          assert c.shape == a.shape
  
      def check_neg():
          a = nd.ones(shape=(LARGE_X, SMALL_Y))
          c = a.__neg__()
          assert c[0][-1] == -1
          assert c.shape == a.shape
  
      def check_mul():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__mul__(a)
          assert c[0][-1] == 6
          assert c.shape == a.shape
  
      def check_div():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__div__(a)
          mx_divide = nd.divide(b, a)
          assert c[0][-1] == 3 / 2
          assert mx_divide[0][-1] == c[0][-1]
          assert c.shape == a.shape
  
      def check_rdiv():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__rdiv__(a)
          assert c[0][-1] == 2 / 3
          assert c.shape == a.shape
  
      def check_mod():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__mod__(a)
          assert c[0][-1] == 1
          assert c.shape == a.shape
  
      def check_rmod():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__rmod__(a)
          assert c[0][-1] == 2
          assert c.shape == a.shape
  
      def check_imod():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__imod__(a)
          assert c[0][-1] == 1
          assert c.shape == a.shape
  
      def check_pow():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__pow__(a)
          assert c[0][-1] == 9
          assert c.shape == a.shape
  
      def check_rpow():
          a = 2 * nd.ones(shape=(LARGE_X, SMALL_Y))
          b = 3 * nd.ones(shape=(LARGE_X, SMALL_Y))
          c = b.__rpow__(a)
          assert c[0][-1] == 8
          assert c.shape == a.shape
  
      def check_sum():
          a = nd.array(np.ones((SMALL_Y, LARGE_X)))
          b = nd.sum(a, axis=1)
          assert b.shape[0] == SMALL_Y
  
      def check_prod():
          a = nd.array(np.ones((SMALL_Y, LARGE_X)))
          b = nd.prod(a, axis=1)
          assert b.shape[0] == SMALL_Y
  
      def check_mean():
          a = create_2d_tensor(rows=SMALL_Y, columns=LARGE_X)
          b = nd.mean(a, axis=0)
          assert b[0] == (SMALL_Y / 2 - 1)
  
      def check_min():
          a = create_2d_tensor(rows=SMALL_Y, columns=LARGE_X)
          b = nd.min(a, axis=0)
          assert b[0] == 0
          assert b[-1] == 0
  
      def check_max():
          a = create_2d_tensor(rows=SMALL_Y, columns=LARGE_X)
          b = nd.max(a, axis=0)
          assert b[0] == (SMALL_Y - 1)
          assert b[-1] == (SMALL_Y - 1)
  
      def check_norm():
          a = np.array(np.full((1, LARGE_X), 3))
          b = np.array(np.full((1, LARGE_X), 4))
          c = nd.array(np.concatenate((a, b), axis=0))
          d = nd.norm(c, ord=2, axis=0)
          e = nd.norm(c, ord=1, axis=0)
          assert d.shape[0] == LARGE_X
          assert e.shape[0] == LARGE_X
          assert d[-1] == 5
          assert e[-1] == 7
  
      def check_argmax():
          a = np.ones((SMALL_Y, LARGE_X))
          b = np.zeros((SMALL_Y, LARGE_X))
          c = nd.array(np.concatenate((a, b), axis=0))
          d = nd.argmax(c, axis=0)
          assert d.shape[0] == LARGE_X
          assert d[-1] == d[0] == 0
  
      def check_iadd():
          a = nd.array(np.ones((SMALL_Y, LARGE_X)))
          b = nd.array(np.ones((SMALL_Y, LARGE_X)))
          c = b + a
          assert c.shape == a.shape
          assert c[0][-1] == 2
  
      def check_isub():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          b = nd.array(np.ones((SMALL_Y, LARGE_X)))
          c = a - b
          assert c.shape == a.shape
          assert c[0][-1] == 2
  
      def check_imul():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          b = nd.array(np.ones((SMALL_Y, LARGE_X)))
          c = b * a
          assert c.shape == a.shape
          assert c[0][-1] == 3
  
      def check_idiv():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 4)))
          b = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 2)))
          c = a / b
          assert c.shape == a.shape
          assert c[0][-1] == 2
  
      def check_eq():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          b = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          c = a == b
          assert np.sum(c[0].asnumpy() == 1).all()
  
      def check_neq():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 2)))
          b = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          c = a != b
          assert np.sum(c[0].asnumpy() == 1).all()
  
      def check_lt():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 2)))
          b = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          d = a <= b
          assert np.sum(d[0].asnumpy() == 1).all()
  
      def check_lte():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 2)))
          b = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          c = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 2)))
          d = a <= b
          e = a <= c
          assert np.sum(d[0].asnumpy() == 1).all()
          assert np.sum(e[0].asnumpy() == 1).all()
  
      def check_gt():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          b = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 2)))
          d = a >= b
          assert np.sum(d[0].asnumpy() == 1).all()
  
      def check_gte():
          a = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          b = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 2)))
          c = nd.array(np.array(np.full((SMALL_Y, LARGE_X), 3)))
          d = a >= b
          e = a >= c
          assert np.sum(d[0].asnumpy() == 1).all()
          assert np.sum(e[0].asnumpy() == 1).all()
  
      def check_sign():
          a = mx.nd.random.normal(-1, 1, shape=(LARGE_X, SMALL_Y))
          mx_res = mx.nd.sign(a)
          assert_almost_equal(
              mx_res[-1][-1].asnumpy(), np.sign(a[-1][-1].asnumpy())
          )
  
      def check_logical():
          def check_logical_and(a, b):
              mx_res = mx.nd.logical_and(a, b)
              assert_almost_equal(
                  mx_res[-1][-1].asnumpy(),
                  np.logical_and(
                      a[-1][-1].asnumpy(), b[-1][-1].asnumpy()
                  ),
              )
  
          def check_logical_or(a, b):
              mx_res = mx.nd.logical_or(a, b)
              assert_almost_equal(
                  mx_res[-1][-1].asnumpy(),
                  np.logical_or(
                      a[-1][-1].asnumpy(), b[-1][-1].asnumpy()
                  ),
              )
  
          def check_logical_not(a, b):
              mx_res = mx.nd.logical_not(a, b)
              assert_almost_equal(
                  mx_res[-1][-1].asnumpy(),
                  np.logical_not(
                      a[-1][-1].asnumpy(), b[-1][-1].asnumpy()
                  ),
              )
  
          def check_logical_xor(a, b):
              mx_res = mx.nd.logical_xor(a, b)
              assert_almost_equal(
                  mx_res[-1][-1].asnumpy(),
                  np.logical_xor(
                      a[-1][-1].asnumpy(), b[-1][-1].asnumpy()
                  ),
              )
  
          a = mx.nd.ones((LARGE_X, SMALL_Y))
          b = mx.nd.zeros((LARGE_X, SMALL_Y))
          check_logical_and(a, b)
          check_logical_or(a, b)
          check_logical_not(a, b)
          check_logical_xor(a, b)
  
      def create_input_for_rounding_ops():
          # Creates an vector with values (-LARGE_X/2 .... -2, -1, 0, 1, 2, .... , LARGE_X/2-1)
          # then divides each element by 2 i.e (-LARGE_X/4 .... -1, -0.5, 0, 0.5, 1, .... , LARGE_X/4-1)
          # and finally broadcasts to
          inp = nd.arange(
              -LARGE_X // 2, LARGE_X // 2, dtype=np.float64
          ).reshape(1, LARGE_X)
          inp = inp / 2
          inp = nd.broadcast_to(inp, (SMALL_Y, LARGE_X))
          return inp
  
      def assert_correctness_of_rounding_ops(
          output, mid, expected_vals
      ):
          # checks verifies 5 values at the middle positions of the input vector
          # i.e mid-2, mid-1, mid, mid+1, mid+2
          output_idx_to_inspect = [
              mid - 2,
              mid - 1,
              mid,
              mid + 1,
              mid + 2,
          ]
          for i in range(len(output_idx_to_inspect)):
              assert (
                  output[1][output_idx_to_inspect[i]]
                  == expected_vals[i]
              )
  
      # TODO(access2rohit): merge similar tests in large vector and array into one file.
      def check_rounding_ops():
          x = create_input_for_rounding_ops()
  
          def check_ceil():
              y = nd.ceil(x)
              # expected ouput for middle 5 values after applying ceil()
              expected_output = [-1, 0, 0, 1, 1]
              assert_correctness_of_rounding_ops(
                  y, LARGE_X // 2, expected_output
              )
  
          def check_fix():
              y = nd.fix(x)
              # expected ouput for middle 5 values after applying fix()
              expected_output = [-1, 0, 0, 0, 1]
              assert_correctness_of_rounding_ops(
                  y, LARGE_X // 2, expected_output
              )
  
          def check_floor():
              y = nd.floor(x)
              # expected ouput for middle 5 values after applying floor()
              expected_output = [-1, -1, 0, 0, 1]
              assert_correctness_of_rounding_ops(
                  y, LARGE_X // 2, expected_output
              )
  
          def check_rint():
              y = nd.rint(x)
              # expected ouput for middle 5 values after applying rint()
              expected_output = [-1, -1, 0, 0, 1]
              assert_correctness_of_rounding_ops(
                  y, LARGE_X // 2, expected_output
              )
  
          def check_round():
              y = nd.round(x)
              # expected ouput for middle 5 values after applying round()
              expected_output = [-1, -1, 0, 1, 1]
              assert_correctness_of_rounding_ops(
                  y, LARGE_X // 2, expected_output
              )
  
          def check_trunc():
              y = nd.trunc(x)
              # expected ouput for middle 5 values after applying trunc()
              expected_output = [-1, 0, 0, 0, 1]
              assert_correctness_of_rounding_ops(
                  y, LARGE_X // 2, expected_output
              )
  
          check_ceil()
          check_fix()
          check_floor()
          check_rint()
          check_round()
          check_trunc()
  
      def create_input_for_trigonometric_ops(vals):
          # Creates large vector input of size(LARGE_X*10, SMALL_Y/10) from vals using broadcast_to operator
          inp = nd.array(vals).reshape(1, 5)
          inp = nd.broadcast_to(inp, (LARGE_X * 10, SMALL_Y // 10))
          return inp
  
      def assert_correctness_of_trigonometric_ops(
          output, expected_vals, atol=1e-3
      ):
          # checks verifies 5 values at positions(0, 1, -3, -2, -1) of the input vector
          output_idx_to_inspect = [0, 1, -3, -2, -1]
          for i in range(len(output_idx_to_inspect)):
              assert (
                  np.abs(
                      output[1][output_idx_to_inspect[i]].asnumpy()
                      - expected_vals[i]
                  )
                  <= atol
              )
  
      def check_trigonometric_ops():
          def check_arcsin():
              x = create_input_for_trigonometric_ops(
                  [-1, -0.707, 0, 0.707, 1]
              )
              y = nd.arcsin(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying arcsin()
              expected_output = [
                  -np.pi / 2,
                  -np.pi / 4,
                  0,
                  np.pi / 4,
                  np.pi / 2,
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_arccos():
              x = create_input_for_trigonometric_ops(
                  [-1, -0.707, 0, 0.707, 1]
              )
              y = nd.arccos(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying arccos()
              expected_output = [
                  np.pi,
                  3 * np.pi / 4,
                  np.pi / 2,
                  np.pi / 4,
                  0,
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_arctan():
              x = create_input_for_trigonometric_ops(
                  [-np.Inf, -1, 0, 1, np.Inf]
              )
              y = nd.arctan(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying arctan()
              expected_output = [
                  -np.pi / 2,
                  -np.pi / 4,
                  0,
                  np.pi / 4,
                  np.pi / 2,
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_sin():
              x = create_input_for_trigonometric_ops(
                  [-np.pi / 2, -np.pi / 4, 0, np.pi / 4, np.pi / 2]
              )
              y = nd.sin(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying sin()
              expected_output = [-1, -0.707, 0, 0.707, 1]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_cos():
              x = create_input_for_trigonometric_ops(
                  [0, np.pi / 4, np.pi / 2, 3 * np.pi / 4, np.pi]
              )
              y = nd.cos(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying cos()
              expected_output = [1, 0.707, 0, -0.707, -1]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_tan():
              x = create_input_for_trigonometric_ops(
                  [-np.pi / 6, -np.pi / 4, 0, np.pi / 4, np.pi / 6]
              )
              y = nd.tan(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying tan()
              expected_output = [-0.577, -1, 0, 1, 0.577]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_arcsinh():
              x = create_input_for_trigonometric_ops(
                  [-np.pi / 2, -np.pi / 4, 0, np.pi / 4, np.pi / 2]
              )
              y = nd.arcsinh(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying arcsinh()
              expected_output = [
                  np.arcsinh(-np.pi / 2),
                  np.arcsinh(-np.pi / 4),
                  0,
                  np.arcsinh(np.pi / 4),
                  np.arcsinh(np.pi / 2),
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_arccosh():
              x = create_input_for_trigonometric_ops(
                  [1, np.pi / 2, 3 * np.pi / 4, np.pi, 5 * np.pi / 4]
              )
              y = nd.arccosh(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying arccosh()
              expected_output = [
                  0,
                  np.arccosh(np.pi / 2),
                  np.arccosh(3 * np.pi / 4),
                  np.arccosh(np.pi),
                  np.arccosh(5 * np.pi / 4),
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_arctanh():
              x = create_input_for_trigonometric_ops(
                  [-1 / 4, -1 / 2, 0, 1 / 4, 1 / 2]
              )
              y = nd.arctanh(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying arctanh()
              expected_output = [
                  np.arctanh(-1 / 4),
                  np.arctanh(-1 / 2),
                  0,
                  np.arctanh(1 / 4),
                  np.arctanh(1 / 2),
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_sinh():
              x = create_input_for_trigonometric_ops(
                  [-np.pi / 2, -np.pi / 4, 0, np.pi / 4, np.pi / 2]
              )
              y = nd.sinh(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying sinh()
              expected_output = [
                  np.sinh(-np.pi / 2),
                  np.sinh(-np.pi / 4),
                  0,
                  np.sinh(np.pi / 4),
                  np.sinh(np.pi / 2),
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_cosh():
              x = create_input_for_trigonometric_ops(
                  [0, 1, np.pi / 2, 3 * np.pi / 4, np.pi]
              )
              y = nd.cosh(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying cosh()
              expected_output = [
                  1,
                  np.cosh(1),
                  np.cosh(np.pi / 2),
                  np.cosh(3 * np.pi / 4),
                  np.cosh(np.pi),
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_tanh():
              x = create_input_for_trigonometric_ops(
                  [-1 / 4, -1 / 2, 0, 1 / 4, 1 / 2]
              )
              y = nd.tanh(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying tanh()
              expected_output = [
                  np.tanh(-1 / 4),
                  np.tanh(-1 / 2),
                  0,
                  np.tanh(1 / 4),
                  np.tanh(1 / 2),
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_radians():
              x = create_input_for_trigonometric_ops(
                  [0, 90, 180, 270, 360]
              )
              y = nd.radians(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying radians()
              expected_output = [
                  0,
                  np.pi / 2,
                  np.pi,
                  3 * np.pi / 2,
                  2 * np.pi,
              ]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          def check_degrees():
              x = create_input_for_trigonometric_ops(
                  [0, np.pi / 2, np.pi, 3 * np.pi / 2, 2 * np.pi]
              )
              y = nd.degrees(x)
              # expected ouput for indices=(0, 1, -3, -2, -1) after applying degrees()
              expected_output = [0, 90, 180, 270, 360]
              assert_correctness_of_trigonometric_ops(
                  y, expected_output
              )
  
          check_arcsin()
          check_arccos()
          check_arctan()
          check_sin()
          check_cos()
          check_tan()
          check_arcsinh()
          check_arccosh()
          check_arctanh()
          check_sinh()
          check_cosh()
          check_tanh()
          check_radians()
          check_degrees()
  
      def check_add_n():
          x = [nd.ones(LARGE_X) for j in range(SMALL_Y)]
          y = nd.add_n(*x)
          assert y[0] == SMALL_Y
          assert y[-1] == SMALL_Y
  
      def check_modulo():
          x = mx.nd.ones((SMALL_Y, LARGE_X)) * 6
          y = mx.nd.ones(LARGE_X) * 4
          z = x % y
          assert z[0][0] == 2
          assert z[-1][-1] == 2
          x = mx.nd.ones((SMALL_Y, LARGE_X)) * 5
          z = nd.modulo(x, y)
          assert z[0][0] == 1
          assert z[-1][-1] == 1
  
      def check_maximum():
          x = mx.nd.ones((SMALL_Y, LARGE_X)) * 3
          y = mx.nd.ones(LARGE_X) * 4
          z = nd.maximum(x, y)
          assert z[0][0] == 4
          assert z[-1][-1] == 4
          z = nd.maximum(x, 5)
          assert z[0][0] == 5
          assert z[-1][-1] == 5
  
      def check_minimum():
          x = mx.nd.ones((SMALL_Y, LARGE_X)) * 3
          y = mx.nd.ones(LARGE_X) * 2
          z = nd.minimum(x, y)
          assert z[0][0] == 2
          assert z[-1][-1] == 2
          z = nd.minimum(x, 5)
          assert z[0][0] == 3
          assert z[-1][-1] == 3
  
      check_elementwise()
      check_reduce()
      check_dot()
      check_argmin()
      check_argsort()
      check_sort()
      check_topk()
      check_exponent_logarithm_operators()
      check_power_operators()
      check_elemwise_add()
      check_add()
      check_sub()
      check_rsub()
      check_neg()
      check_mul()
      check_div()
      check_rdiv()
      check_mod()
      check_rmod()
      check_imod()
      check_pow()
      check_rpow()
      check_sum()
      check_prod()
      check_mean()
      check_min()
      check_max()
      check_norm()
      check_argmax()
      check_iadd()
      check_isub()
      check_imul()
      check_idiv()
      check_eq()
      check_neq()
      check_lt()
      check_lte()
      check_gt()
      check_gte()
      check_sign()
      check_logical()
      check_rounding_ops()
      check_trigonometric_ops()
      check_add_n()
      check_modulo()
      check_maximum()
      check_minimum()
  
file_path: mxnet/tests/nightly/test_large_array.py
imports: import os
  import sys
  import tempfile
  import math
  import numpy
  import mxnet
  from mxnet.test_utils import rand_ndarray, assert_almost_equal, rand_coord_2d, default_device, check_symbolic_forward, create_2d_tensor
  from mxnet.util import TemporaryDirectory
  from mxnet import gluon, nd
  from common import with_seed
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_basic() and returns: inp, inp