Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
numpy /
f2py /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
src
[ DIR ]
drwxr-xr-x
__init__.py
0
B
-rw-r--r--
test_abstract_interface.py
1.77
KB
-rw-r--r--
test_array_from_pyobj.py
22.28
KB
-rw-r--r--
test_assumed_shape.py
1.53
KB
-rw-r--r--
test_block_docstring.py
627
B
-rw-r--r--
test_callback.py
8
KB
-rw-r--r--
test_common.py
802
B
-rw-r--r--
test_compile_function.py
4.21
KB
-rw-r--r--
test_crackfortran.py
3.96
KB
-rw-r--r--
test_kind.py
1012
B
-rw-r--r--
test_mixed.py
911
B
-rw-r--r--
test_module_doc.py
950
B
-rw-r--r--
test_parameter.py
3.82
KB
-rw-r--r--
test_quoted_character.py
927
B
-rw-r--r--
test_regression.py
1.77
KB
-rw-r--r--
test_return_character.py
3.83
KB
-rw-r--r--
test_return_complex.py
4.51
KB
-rw-r--r--
test_return_integer.py
4.47
KB
-rw-r--r--
test_return_logical.py
4.73
KB
-rw-r--r--
test_return_real.py
5.28
KB
-rw-r--r--
test_semicolon_split.py
1.48
KB
-rw-r--r--
test_size.py
1.26
KB
-rw-r--r--
test_string.py
610
B
-rw-r--r--
util.py
9.36
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : test_return_complex.py
import pytest from numpy import array from numpy.testing import assert_, assert_raises from . import util class TestReturnComplex(util.F2PyTest): def check_function(self, t, tname): if tname in ['t0', 't8', 's0', 's8']: err = 1e-5 else: err = 0.0 assert_(abs(t(234j) - 234.0j) <= err) assert_(abs(t(234.6) - 234.6) <= err) assert_(abs(t(234) - 234.0) <= err) assert_(abs(t(234.6 + 3j) - (234.6 + 3j)) <= err) #assert_( abs(t('234')-234.)<=err) #assert_( abs(t('234.6')-234.6)<=err) assert_(abs(t(-234) + 234.) <= err) assert_(abs(t([234]) - 234.) <= err) assert_(abs(t((234,)) - 234.) <= err) assert_(abs(t(array(234)) - 234.) <= err) assert_(abs(t(array(23 + 4j, 'F')) - (23 + 4j)) <= err) assert_(abs(t(array([234])) - 234.) <= err) assert_(abs(t(array([[234]])) - 234.) <= err) assert_(abs(t(array([234], 'b')) + 22.) <= err) assert_(abs(t(array([234], 'h')) - 234.) <= err) assert_(abs(t(array([234], 'i')) - 234.) <= err) assert_(abs(t(array([234], 'l')) - 234.) <= err) assert_(abs(t(array([234], 'q')) - 234.) <= err) assert_(abs(t(array([234], 'f')) - 234.) <= err) assert_(abs(t(array([234], 'd')) - 234.) <= err) assert_(abs(t(array([234 + 3j], 'F')) - (234 + 3j)) <= err) assert_(abs(t(array([234], 'D')) - 234.) <= err) #assert_raises(TypeError, t, array([234], 'a1')) assert_raises(TypeError, t, 'abc') assert_raises(IndexError, t, []) assert_raises(IndexError, t, ()) assert_raises(TypeError, t, t) assert_raises(TypeError, t, {}) try: r = t(10 ** 400) assert_(repr(r) in ['(inf+0j)', '(Infinity+0j)'], repr(r)) except OverflowError: pass class TestF77ReturnComplex(TestReturnComplex): code = """ function t0(value) complex value complex t0 t0 = value end function t8(value) complex*8 value complex*8 t8 t8 = value end function t16(value) complex*16 value complex*16 t16 t16 = value end function td(value) double complex value double complex td td = value end subroutine s0(t0,value) complex value complex t0 cf2py intent(out) t0 t0 = value end subroutine s8(t8,value) complex*8 value complex*8 t8 cf2py intent(out) t8 t8 = value end subroutine s16(t16,value) complex*16 value complex*16 t16 cf2py intent(out) t16 t16 = value end subroutine sd(td,value) double complex value double complex td cf2py intent(out) td td = value end """ @pytest.mark.parametrize('name', 't0,t8,t16,td,s0,s8,s16,sd'.split(',')) def test_all(self, name): self.check_function(getattr(self.module, name), name) class TestF90ReturnComplex(TestReturnComplex): suffix = ".f90" code = """ module f90_return_complex contains function t0(value) complex :: value complex :: t0 t0 = value end function t0 function t8(value) complex(kind=4) :: value complex(kind=4) :: t8 t8 = value end function t8 function t16(value) complex(kind=8) :: value complex(kind=8) :: t16 t16 = value end function t16 function td(value) double complex :: value double complex :: td td = value end function td subroutine s0(t0,value) complex :: value complex :: t0 !f2py intent(out) t0 t0 = value end subroutine s0 subroutine s8(t8,value) complex(kind=4) :: value complex(kind=4) :: t8 !f2py intent(out) t8 t8 = value end subroutine s8 subroutine s16(t16,value) complex(kind=8) :: value complex(kind=8) :: t16 !f2py intent(out) t16 t16 = value end subroutine s16 subroutine sd(td,value) double complex :: value double complex :: td !f2py intent(out) td td = value end subroutine sd end module f90_return_complex """ @pytest.mark.parametrize('name', 't0,t8,t16,td,s0,s8,s16,sd'.split(',')) def test_all(self, name): self.check_function(getattr(self.module.f90_return_complex, name), name)
Close