code: def test_nd_array():
      shape = [2, 3, 4]
      a = nn.NdArray(shape)
      npa = np.arange(a.size).reshape(a.shape).astype(np.int32)
      a.data = npa
      b = nn.NdArray.from_numpy_array(npa)
      b.dtype == np.int32
      assert np.all(a.data == npa)
      assert np.all(a.data == b.data)
      assert a.shape == npa.shape
      assert b.size == np.prod(shape)
      a.cast(np.int32)
      assert a.data.dtype == np.int32
      b.zero()
      assert np.all(b.data == 0)
      a.fill(3)
      assert np.all(a.data == 3)
      b.copy_from(a)
      assert np.all(a.data == b.data)
  
imports: import numpy
  import nnabla
  import pytest
  from nnabla.ext_utils import get_extension_context
  import nnabla.functions
label_desc: Use image node_id 1 for calling a global function with example usage: test_nd_array() without return types