관리-도구
편집 파일: test_character.cpython-311.pyc
� �܋f!P � �� � d dl Z d dlZd dlmZmZmZ d dlZd dlm Z G d� de j � � Z G d� de j � � Z G d� d e j � � Z G d � de j � � ZdS )� N)�assert_array_equal�assert_equal� assert_raises)�utilc �2 � e Zd ZdZdZg d�ZdZeD ]�ZeZ e d�� � � ee� � Ze ej d� g d�e� �d�e� �d �e� �d �e� �d�e� �d�e� �d�e� �d �e� �d�e� �d�e� �d�e� �d �e� �d�e� �d�e� �d �e� �d�e� �d�e� �d�e� �d�e� �d�e� �d�e� �d�e� �d�e� �d�e� �d�e� �d�� � � � z Z��ej � de� � d� � � Zej � dedd� � � d� � � Zej � de� � d� � � Zej � de� � d� � � Zej � de� � d� � � ZdS )�TestCharacterString�.f90�test_character_string��1�3�star� �(*))r z subroutine �_input_z(c, o, n) character*z�, intent(in) :: c integer n !f2py integer, depend(c), intent(hide) :: n = slen(c) integer*1, dimension(n) :: o !f2py intent(out) o o = transfer(c, o) end subroutine �_output_z�, intent(out) :: c integer n integer*1, dimension(n), intent(in) :: o !f2py integer, depend(o), intent(hide) :: n = len(o) c = transfer(o, c) end subroutine � _array_input_z;(c, o, m, n) integer m, i, n character*aH , intent(in), dimension(m) :: c !f2py integer, depend(c), intent(hide) :: m = len(c) !f2py integer, depend(c), intent(hide) :: n = f2py_itemsize(c) integer*1, dimension(m, n), intent(out) :: o do i=1,m o(i, :) = transfer(c(i), o(i, :)) end do end subroutine �_array_output_z!(c, o, m, n) character*a , intent(out), dimension(m) :: c integer n integer*1, dimension(m, n), intent(in) :: o !f2py character(f2py_len=n) :: c !f2py integer, depend(o), intent(hide) :: m = len(o) !f2py integer, depend(o), intent(hide) :: n = shape(o, 1) do i=1,m c(i) = transfer(o(i, :), c(i)) end do end subroutine �_2d_array_input_zH(c, o, m1, m2, n) integer m1, m2, i, j, n character*a� , intent(in), dimension(m1, m2) :: c !f2py integer, depend(c), intent(hide) :: m1 = len(c) !f2py integer, depend(c), intent(hide) :: m2 = shape(c, 1) !f2py integer, depend(c), intent(hide) :: n = f2py_itemsize(c) integer*1, dimension(m1, m2, n), intent(out) :: o do i=1,m1 do j=1,m2 o(i, j, :) = transfer(c(i, j), o(i, j, :)) end do end do end subroutine z �lengthc �( � ddi� ||� � }t | j | j dz |z � � }dddd�| }t ||� � t j t t t |� � � � d� � � � � d S ) Nr r r �a�abc�abcdeabcdeabcder �u1��dtype) �get�getattr�module�fprefixr �np�array�list�map�ord��selfr �fsuffix�fr s �r/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/f2py/tests/test_character.py� test_inputzTestCharacterString.test_inputL s� � ��&�/�%�%�f�f�5�5���D�K��� �!9�G�!C�D�D���E�;�7�7��?���1�1�Q�4�4���$�s�3��{�{�*;�*;�4�!H�!H�!H�I�I�I�I�I� N���c � � |}t | j | j dz |z � � }ddd�| }t |t j t t t |� � � � d�� � � � |� � � � � d S )Nr r r )r r r r ) r r r! r r"