
    g-                     \    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 Z
d Zd Zy	)
   )number_types)packer)memoryview_type)import_numpyNumpyRequiredForThisFeature   c                 >    | j                  t        |      |      d   S )z7 Get decodes a value at buf[head] using `packer_type`.     )unpack_fromr   )packer_typebufheads      G/var/www/openai/venv/lib/python3.12/site-packages/flatbuffers/encode.pyGetr      s    ""?3#7>qAA    c                 V    t         t         j                  || ||      S t        d      )zn GetVecAsNumpy decodes values starting at buf[head] as
    `numpy_type`, where `numpy_type` is a numpy dtype. )dtypecountoffsetzNumpy was not found.)np
frombufferr   )
numpy_typer   r   r   s       r   GetVectorAsNumpyr      s.     
~ }}S
%}OO)*@AAr   c                 *    | j                  |||       y)z5 Write encodes `n` at buf[head] using `packer_type`. N)	pack_into)r   r   r   ns       r   Writer   (   s    #tQ'r   N) r   Nr   compatr   r   r   r   FILE_IDENTIFIER_LENGTHr   r   r    r   r   <module>r#      s1       # =^ B
B(r   