code: def test_recipr0():
      X = np.array([[2, 1], [-4, 0]])
      Y = recipr0(X)
      assert_array_almost_equal(Y, np.array([[0.5, 1], [-0.25, 0]]))
      # check that lists have arrived
      XL = [0, 1, -1]
      assert_array_almost_equal(recipr0(XL), [0, 1, -1])
      # scalars
      assert recipr0(-1) == -1
      assert recipr0(0) == 0
      assert recipr0(2) == 0.5
  
file_path: nipy/nipy/algorithms/utils/tests/test_matrices.py
imports: import numpy
  import scipy.linalg
  from numpy.testing import assert_almost_equal, assert_array_almost_equal
  from ..matrices import full_rank, matrix_rank, pos_recipr, recipr0
label_desc: Use image node_id 4 for calling a global function with example usage: test_recipr0() without return types