code: def test_f_output():
      # Test f_output
      res = RESULTS.Fcontrast([1, 0])
      exp_f = RESULTS.t(0) ** 2
      assert_array_almost_equal(exp_f, res.F)
      # Test arrays work as well as lists
      res = RESULTS.Fcontrast(np.array([1, 0]))
      assert_array_almost_equal(exp_f, res.F)
      # Test with matrix against R
      res = RESULTS.Fcontrast(np.eye(2))
      assert_array_almost_equal(31.06, res.F, 2)
      # Input matrix checked for size
      pytest.raises(ValueError, RESULTS.Fcontrast, [1])
      pytest.raises(ValueError, RESULTS.Fcontrast, [1, 0, 0])
      # And shape
      pytest.raises(
          ValueError, RESULTS.Fcontrast, np.array([1, 0])[:, None]
      )
  
file_path: nipy/nipy/algorithms/statistics/models/tests/test_model.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  from ..regression import OLSModel
label_desc: Use image node_id 4 for calling a global function with example usage: test_f_output() without return types