
    AVh}                        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 m!Z! ddl"m#Z#  ed Z$ eddd      Z% eddd      Z&dde#e!e$f   de#e!e%f   de#e!e&f   de#e!e$f   fdZ'  ed       ejP                  e'            Z)de#e!e$f   de#e!e%f   de#e!e&f   de#e!e$f   fdZ*y)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Any)	Annotated) 	TV_Roll_Tz_atypes.BFloat16z_atypes.Boolz_atypes.Complex128z_atypes.Complex64z_atypes.Float16z_atypes.Float32z_atypes.Float64z_atypes.Float8e4m3b11fnuzz_atypes.Float8e4m3fnz_atypes.Float8e4m3fnuzz_atypes.Float8e5m2z_atypes.Float8e5m2fnuzz_atypes.Halfz_atypes.Int16_atypes.Int32z_atypes.Int4_atypes.Int64z_atypes.Int8z_atypes.QInt16z_atypes.QInt32z_atypes.QInt8z_atypes.QUInt16z_atypes.QUInt8z_atypes.Resourcez_atypes.Stringz_atypes.UInt16z_atypes.UInt32z_atypes.UInt4z_atypes.UInt64z_atypes.UInt8z_atypes.VariantTV_Roll_Tshiftr   r   TV_Roll_Taxisinputshiftaxisreturnc                    t         j                   xs t        j                         }|j                  }|j                  r	 t	        j
                  |d|| ||      }|S t        j                  d| |||      \  }}}	}
|
dd }t        j                          rYd|	j#                  d      d|	j#                  d      d|	j#                  d      f}|	j$                  }t        j&                  d|||       |\  }|S # t        j                  $ r }t        j                  ||       Y d}~nd}~wt        j                  $ r Y nw xY w	 t        | ||||      S # t        j                  $ r Y w xY w)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   _thread_local_datais_eagerr   TFE_Py_FastPathExecute_core_NotOkStatusException_opsraise_from_not_ok_status_FallbackExceptionroll_eager_fallback_SymbolicException_op_def_library_apply_op_helper_executemust_record_gradient_get_attr_typeinputsrecord_gradient)r   r   r   r   _ctxtld_resulte__op_outputs_attrs_inputs_flats                S/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/ops/gen_manip_ops.pyrollr?      si   R 
			0h..0$#\\11fdE5$0gn (88e5t$@!QXQK'""$3%%c*H  *G  )+F ::Lfg/('	.+ && -
##At,,## 
 
4T3 3## 
s0    C3 3D:D!!D:9D:>E E%$E%zraw_ops.Rollc                    t        j                  | g|g       \  }\  } t        j                  |g|t        j                  t        j                  g      \  }\  }t        j                  |g|t        j                  t        j                  g      \  }\  }| ||g}d|d|d|f}	t        j
                  dd||	||      }
t        j                         rt        j                  d||	|
       |
\  }
|
S )Nr    r!   r"   s   Roll   )r3   attrsr   r   r   )r0   args_to_matching_eager_dtypesint32int64r   r1   r4   )r   r   r   r   r   _attr_T_attr_Tshift_attr_Taxisr=   r<   r7   s              r>   r,   r,   g   s    55ugsBG'8E#::E7C'--Y`YfYfIij,!88$w}}V]VcVcFfg+w%,(L';G&WaF!$41'""$fg/('	.    )N)+__doc__collectionstensorflow.pythonr   tensorflow.python.eagerr   r#   r   r'   r   r0   tensorflow.python.frameworkr   rD   tensorflow.security.fuzzing.pyr   _atypesr	   _op_def_registryr
   r)   r   r.   "tensorflow.python.util.deprecationr   tensorflow.python.utilr   	_dispatch tensorflow.python.util.tf_exportr   typingr   r   r   typing_extensionsr   r   r   r   r?   	to_raw_opr   r,    rJ   r>   <module>r[      sY  
  6 7 1 7 9 F K 3 I C 8 6 % % '  v		)?OL/JE	#y.) E)C<O2P EXabegtbtXu E  FO  PS  U^  P^  F_ EN !y !56yi8 3P^K^A_ gpqt  wD  rD  hE   U^  _b  dm  _m  Un rJ   