
    mjo                        d dl Z d dlZ e eeej                  j                  d                  Zedk  rRej                  ej                  ej                  ej                  fZej                  ej                  ej                   fZn;ej                  ej                  ej                  fZej                  ej                   fZ G d de j$                        Zd Zy)    N.)   r   r   c                       e Zd ZdZd Zy)NumpyEncoderz#Custom encoder for numpy data typesc                    t        |t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  t        j                  f      rt        |      S t        |t              rt        |      S t        |t               r|j"                  |j$                  dS t        |t        j&                  f      r|j)                         S t        |t        j*                        rt-        |      S t        |t        j.                        ry t0        j2                  j5                  | |      S )N)realimag)
isinstancenpint_intcintpint8int16int32int64uint8uint16uint32uint64int	NP_FLOATSfloat
NP_COMPLEXr   r	   ndarraytolistbool_boolvoidjsonJSONEncoderdefault)selfobjs     H/DATA/.local/lib/python3.12/site-packages/trame_client/encoders/numpy.pyr"   zNumpyEncoder.default   s    						
  s8OY':Z(HHchh77bjj]+::<bhh(9bgg'''c22    N)__name__
__module____qualname____doc__r"    r&   r%   r   r      s
    -"3r&   r   c                 ^    t        j                  t        j                  | t                    S )N)cls)r    loadsdumpsr   )data_structures    r%   encoder1   6   s    ::djj\BCCr&   )r    numpyr   tuplemapr   __version__split
np_versionfloat_float16float32float64r   complex_	complex64
complex128r   r!   r   r1   r+   r&   r%   <module>r?      s     3sBNN00567
	BJJ

BJJ?I++r||R]];JRZZ4I,,.J%34## %3PDr&   