code: def test_ndarray():
      a1 = hl.eval(hl.nd.array((1, 2, 3)))
      a2 = hl.eval(hl.nd.array([1, 2, 3]))
      an1 = np.array((1, 2, 3))
      an2 = np.array([1, 2, 3])
  
      assert np.array_equal(a1, a2) and np.array_equal(a2, an2)
  
      a1 = hl.eval(hl.nd.array(((1), (2), (3))))
      a2 = hl.eval(hl.nd.array(([1], [2], [3])))
      a3 = hl.eval(hl.nd.array([[1], [2], [3]]))
  
      an1 = np.array(((1), (2), (3)))
      an2 = np.array(([1], [2], [3]))
      an3 = np.array([[1], [2], [3]])
  
      assert (
          np.array_equal(a1, an1)
          and np.array_equal(a2, an2)
          and np.array_equal(a3, an3)
      )
  
      a1 = hl.eval(hl.nd.array(((1, 2), (2, 5), (3, 8))))
      a2 = hl.eval(hl.nd.array([[1, 2], [2, 5], [3, 8]]))
  
      an1 = np.array(((1, 2), (2, 5), (3, 8)))
      an2 = np.array([[1, 2], [2, 5], [3, 8]])
  
      assert np.array_equal(a1, an1) and np.array_equal(a2, an2)
  
imports: import math
  import numpy
  import re
  from ..helpers import *
  import pytest
  from hail.utils.java import FatalError, HailUserError
label_desc: Use image node_id 31 for calling a global function with example usage: test_ndarray() without return types