a
    Sic-                     @   sZ   d dl mZ d dl mZ d dlmZ d dlmZmZ e ZdZ	dd Z
dd	 Zd
d ZdS )   )number_types)packer)memoryview_type)import_numpyNumpyRequiredForThisFeature   c                 C   s   |  t||d S )z7 Get decodes a value at buf[head] using `packer_type`.     )unpack_fromr   )packer_typebufhead r   N/var/www/html/django/DPS/env/lib/python3.9/site-packages/flatbuffers/encode.pyGet   s    r   c                 C   s&   t durt j|| ||dS tddS )zn GetVecAsNumpy decodes values starting at buf[head] as
    `numpy_type`, where `numpy_type` is a numpy dtype. N)dtypecountoffsetzNumpy was not found.)np
frombufferr   )Z
numpy_typer   r   r   r   r   r   GetVectorAsNumpy   s    r   c                 C   s   |  ||| dS )z5 Write encodes `n` at buf[head] using `packer_type`. N)	pack_into)r
   r   r   nr   r   r   Write(   s    r   N) r   Nr   compatr   r   r   r   FILE_IDENTIFIER_LENGTHr   r   r   r   r   r   r   <module>   s   