
    Vpf3                        d dl mZ d dlZd dlZd dlmZmZ d dlm	Z	 eZ
eZeZ G d dej                  Zde_        eej        ej        eeeef         Zde_        eeej        ef         Zd	e_        dS )
    )annotationsN)AnyUnion)Sequencec                  N   e Zd ZdZdgZeej        dd                        Zeej        dd                        Z	eej        dd                        Z
eej        dd
                        Zej        dd            Zeej        dd                        Zeej        dd                        Zeej        dd                        Zeej        dd                        Zeej        dd                        Zeej        d d                        Zej        d             ZdS )!Arraya  Array base class for JAX

  ``jax.Array`` is the public interface for instance checks and type annotation
  of JAX arrays and tracers. Its main applications are in instance checks and
  type annotations; for example::

    x = jnp.arange(5)
    isinstance(x, jax.Array)  # returns True both inside and outside traced functions.

    def f(x: Array) -> Array:  # type annotations are valid for traced and non-traced types.
      return x

  ``jax.Array`` should not be used directly for creation of arrays; instead you
  should use array creation routines offered in :mod:`jax.numpy`, such as
  :func:`jax.numpy.array`, :func:`jax.numpy.zeros`, :func:`jax.numpy.ones`,
  :func:`jax.numpy.full`, :func:`jax.numpy.arange`, etc.
  __weakref__returnnp.dtypec                    dS )z2The data type (:class:`numpy.dtype`) of the array.N selfs    R/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/jax/_src/basearray.pydtypezArray.dtype9             intc                    dS )z&The number of dimensions in the array.Nr   r   s    r   ndimz
Array.ndim>   r   r   c                    dS )z*The total number of elements in the array.Nr   r   s    r   sizez
Array.sizeC   r   r   tuple[int, ...]c                    dS )zThe shape of the array.Nr   r   s    r   shapezArray.shapeH   r   r   indexc                    dS )z>Return an array of the addressable data at a particular index.Nr   )r   r   s     r   addressable_datazArray.addressable_dataN   r   r   Sequence[Shard]c                    dS )zList of addressable shards.Nr   r   s    r   addressable_shardszArray.addressable_shardsR   r   r   c                    dS )zList of global shards.Nr   r   s    r   global_shardszArray.global_shardsW   r   r   boolc                    dS )a  Is this Array fully addressable?

    A jax.Array is fully addressable if the current process can address all of
    the devices named in the :class:`Sharding`. ``is_fully_addressable`` is
    equivalent to "is_local" in multi-process JAX.

    Note that fully replicated is not equal to fully addressable i.e.
    a jax.Array which is fully replicated can span across multiple hosts and is
    not fully addressable.
    Nr   r   s    r   is_fully_addressablezArray.is_fully_addressable\   r   r   c                    dS )zIs this Array fully replicated?Nr   r   s    r   is_fully_replicatedzArray.is_fully_replicatedj   r   r   Shardingc                    dS )zThe sharding for the array.Nr   r   s    r   shardingzArray.shardingo   r   r   Device | Shardingc                    dS )zArray API-compatible device attribute.

    For single-device arrays, this returns a Device. For sharded arrays, this
    returns a Sharding.
    Nr   r   s    r   devicezArray.devicet   r   r   c                    dS )z(Copies jax.Array to host asynchronously.Nr   r   s    r   copy_to_host_asynczArray.copy_to_host_async}   r   r   N)r
   r   )r
   r   )r
   r   )r   r   r
   r   )r
   r   )r
   r$   )r
   r)   )r
   r,   )__name__
__module____qualname____doc__	__slots__propertyabcabstractmethodr   r   r   r   r   r!   r#   r&   r(   r+   r.   r0   r   r   r   r   r       s8        , o)= = =  8= 1 1 1  81 5 5 5  85 " " "  8" I I I I & & &  8& ! ! !  8! 
 
 
  8
 * * *  8* & & &  8&     8 3 3 3 3 3r   r   jaxz2Type annotation for JAX-compatible static scalars.z+Type annotation for JAX array-like objects.)
__future__r   r7   numpynptypingr   r   collections.abcr   DeviceShardr)   ABCr   r2   bool_numberr$   r   floatcomplexStaticScalarr4   ndarray	ArrayLiker   r   r   <module>rI      s  " # " " " " " 



             $ $ $ $ $ $ 

_3 _3 _3 _3 _3CG _3 _3 _3D   (BIUG L  *	
 B	   r   