Alias for allclose_real32_1d
This version is deprecated and is only included for backwards compatibility. It will be removed in FTorch version 2.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=real32), | intent(in), | dimension(:) | :: | got |
The array of values to be tested |
|
| real(kind=real32), | intent(in), | dimension(:) | :: | expect |
The array of expected values |
|
| character(len=*), | intent(in) | :: | test_name |
Name of the test being run |
||
| real(kind=real32), | 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.) |
Did the assertion pass?
function assert_allclose_real32_1d(got, expect, test_name, rtol, print_result) result(test_pass) character(len=*), intent(in) :: test_name !! Name of the test being run real(kind=real32), intent(in), dimension(:) :: got !! The array of values to be tested real(kind=real32), intent(in), dimension(:) :: expect !! The array of expected values real(kind=real32), 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_real32_1d(got, expect, test_name, rtol, print_result) end function assert_allclose_real32_1d