assert_allclose_real64_2d Function

public function assert_allclose_real64_2d(got, expect, test_name, rtol, print_result) result(test_pass)

Alias for allclose_real64_2d

This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in), dimension(:,:) :: got

The array of values to be tested

real(kind=real64), intent(in), dimension(:,:) :: expect

The array of expected values

character(len=*), intent(in) :: test_name

Name of the test being run

real(kind=real64), intent(in), optional :: rtol

Optional relative tolerance (defaults to 1e-5)

logical, intent(in), optional :: print_result

Optionally print test result to screen (defaults to .true.)

Return Value logical

Did the assertion pass?


Calls

proc~~assert_allclose_real64_2d~~CallsGraph proc~assert_allclose_real64_2d assert_allclose_real64_2d proc~allclose_real64_2d allclose_real64_2d proc~assert_allclose_real64_2d->proc~allclose_real64_2d proc~test_print test_print proc~allclose_real64_2d->proc~test_print

Called by

proc~~assert_allclose_real64_2d~~CalledByGraph proc~assert_allclose_real64_2d assert_allclose_real64_2d interface~assert_allclose assert_allclose interface~assert_allclose->proc~assert_allclose_real64_2d

Source Code

    function assert_allclose_real64_2d(got, expect, test_name, rtol, print_result) result(test_pass)

      character(len=*), intent(in) :: test_name                                             !! Name of the test being run
      real(kind=real64), intent(in), dimension(:,:) :: got     !! The array of values to be tested
      real(kind=real64), intent(in), dimension(:,:) :: expect  !! The array of expected values
      real(kind=real64), intent(in), optional :: rtol                         !! Optional relative tolerance (defaults to 1e-5)
      logical, intent(in), optional :: print_result                                         !! Optionally print test result to screen (defaults to .true.)

      logical :: test_pass  !! Did the assertion pass?

      write(*,*) "Warning: assert_allclose is deprecated and will be removed in FTorch version 2.0. Please use allclose instead."

      test_pass = allclose_real64_2d(got, expect, test_name, rtol, print_result)

    end function assert_allclose_real64_2d