o
    ?e                      @   s  d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZm Z  edej!ej"ej#ej$ej%ej&ej'ej(ej)ej*ej+ej,ej-ej.ej/ej0ej1ej2ej3ej4ej5ej6ej7ej8Z9edej*ej+Z:edej*ej+Z;ddej<e9 dej<e: dej<e; dej<e9 fddZ=ede>e=Z?dej<e9 dej<e: dej<e; dej<e9 fddZ@dS )zUPython wrappers around TensorFlow ops.

This file is MACHINE GENERATED! Do not edit.
    N)
pywrap_tfe)context)core)execute)dtypes)annotation_types)op_def_registry)ops)op_def_library)deprecated_endpoints)dispatch)	tf_export)TypeVarList	TV_Roll_TTV_Roll_TshiftTV_Roll_Taxisinputshiftaxisreturnc              
   C   s  t j pt  }|j}|jrRzt|d|| ||}|W S  tjy3 } zt	|| W Y d}~nd}~w tj
y<   Y nw z
t| ||||dW S  tjyQ   Y nw tjd| |||d\}}}	}
|
dd }t rd|	dd|	dd|	df}|	j}td||| |\}|S )ax  Rolls the elements of a tensor along an axis.

  The elements are shifted positively (towards larger indices) by the offset of
  `shift` along the dimension of `axis`. Negative `shift` values will shift
  elements in the opposite direction. Elements that roll passed the last position
  will wrap around to the first and vice versa. Multiple shifts along multiple
  axes may be specified.

  For example:

  ```
  # 't' is [0, 1, 2, 3, 4]
  roll(t, shift=2, axis=0) ==> [3, 4, 0, 1, 2]

  # shifting along multiple dimensions
  # 't' is [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]
  roll(t, shift=[1, -2], axis=[0, 1]) ==> [[7, 8, 9, 5, 6], [2, 3, 4, 0, 1]]

  # shifting along the same axis multiple times
  # 't' is [[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]]
  roll(t, shift=[2, -3], axis=[1, 1]) ==> [[1, 2, 3, 4, 0], [6, 7, 8, 9, 5]]
  ```

  Args:
    input: A `Tensor`.
    shift: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      Dimension must be 0-D or 1-D. `shift[i]` specifies the number of places by which
      elements are shifted positively (towards larger indices) along the dimension
      specified by `axis[i]`. Negative shifts will roll the elements in the opposite
      direction.
    axis: A `Tensor`. Must be one of the following types: `int32`, `int64`.
      Dimension must be 0-D or 1-D. `axis[i]` specifies the dimension that the shift
      `shift[i]` should occur. If the same axis is referenced more than once, the
      total shift for that axis will be the sum of all the shifts that belong to that
      axis.
    name: A name for the operation (optional).

  Returns:
    A `Tensor`. Has the same type as `input`.
  RollN)namectx)r   r   r   r   TTshiftTaxis)_contextr   Z_thread_local_dataZis_eagerr   ZTFE_Py_FastPathExecute_coreZ_NotOkStatusException_opsZraise_from_not_ok_statusZ_FallbackExceptionroll_eager_fallbackZ_SymbolicException_op_def_libraryZ_apply_op_helper_executemust_record_gradientZ_get_attr_typeinputsrecord_gradient)r   r   r   r   Z_ctxtld_resulte_Z_opZ_outputs_attrs_inputs_flat r,   d/home/www/facesmatcher.com/pyenv/lib/python3.10/site-packages/tensorflow/python/ops/gen_manip_ops.pyroll   sH   )


r.   zraw_ops.Rollc                 C   s   t | g|g \}\} t |g|tjtjg\}\}t |g|tjtjg\}\}| ||g}d|d|d|f}	t jdd||	||d}
t  rMt d||	|
 |
\}
|
S )Nr   r   r   s   Roll   )r$   attrsr   r   r   )r"   Zargs_to_matching_eager_dtypesZint32Zint64r   r#   r%   )r   r   r   r   r   Z_attr_TZ_attr_TshiftZ_attr_Taxisr+   r*   r'   r,   r,   r-   r    f   s   
r    )N)A__doc__collectionsZtensorflow.pythonr   Ztensorflow.python.eagerr   r   r   r   r   r"   Ztensorflow.python.frameworkr   r1   Ztensorflow.security.fuzzing.pyr   Z_atypesr   Z_op_def_registryr	   r   r
   r!   Z"tensorflow.python.util.deprecationr   Ztensorflow.python.utilr   	_dispatchZ tensorflow.python.util.tf_exportr   typingr   r   ZBFloat16ZBoolZ
Complex128Z	Complex64ZFloat16ZFloat32ZFloat64ZHalfZInt16ZInt32ZInt64ZInt8ZQInt16ZQInt32ZQInt8ZQUInt16ZQUInt8ResourceStringZUInt16ZUInt32ZUInt64ZUInt8ZVariantr   r   r   ZTensorFuzzingAnnotationr.   Z	to_raw_opr   r    r,   r,   r,   r-   <module>   s*    h4G6