Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelDkhn committed Nov 30, 2023
1 parent 808bcb9 commit dfe51ba
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/framework/operators/tensor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ use orion::operators::tensor::TensorTrait;
| [`tensor.reduce_l2`](tensor.reduce\_l2.md) | Computes the L2 norm of the input tensor's elements along the provided axes. |
| [`tensor.gather_elements`](tensor.gather\_elements.md) | GatherElements is an indexing operation that produces its output by indexing into the input data tensor at index positions determined by elements of the indices tensor. |
| [`tensor.reduce_min`](tensor.reduce\_min.md) | Computes the min of the input tensor's elements along the provided axes. |
| [`tensor.sequence_construct`](tensor.sequence\_construct.md) | Constructs a tensor sequence containing the input tensors. |
| [`tensor.sequence_empty`](tensor.sequence\_empty.md) | Returns an empty tensor sequence. |
| [`tensor.sequence_length`](tensor.sequence\_length.md) | Returns the length of the input sequence. |
| [`tensor.sequence_insert`](tensor.sequence\_insert.md) | Insert a tensor into a sequence. |
| [`tensor.sequence_at`](tensor.sequence\_at.md) | Outputs the tensor at the specified position in the input sequence. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ A new `Tensor<T>` of the same shape as the input tensor with selected elements b

```rust
use array::{ArrayTrait, SpanTrait};

use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor, U32Tensor};
use orion::numbers::{i32, IntegerTrait};

Expand Down
3 changes: 1 addition & 2 deletions docs/framework/operators/tensor/tensor.is_inf.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ A new `Tensor<bool>` instance with entries set to true iff the input tensors cor
## Examples

```rust
use array::{ArrayTrait, SpanTrait};

use array::{ArrayTrait, SpanTrait};
use orion::operators::tensor::{BoolTensor, TensorTrait, Tensor, U32Tensor};

fn is_inf_example() -> Tensor<bool> {
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/operators/tensor/tensor.reduce_min.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn reduce_min_example() -> Tensor<u32> {
shape: array![2, 2, 2].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7].span(),
);

// We can call `reduce_mean` function as follows.
// We can call `reduce_min` function as follows.
return tensor.reduce_min(axes: array![1].span(),
keepdims: Option::None(()),
noop_with_empty_axes: Option::None(()));
Expand Down
11 changes: 9 additions & 2 deletions src/operators/tensor/core.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -3745,7 +3745,7 @@ trait TensorTrait<T> {
///
/// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor};
///
/// fn xor_example() -> Tensor<usize> {
/// fn and_example() -> Tensor<usize> {
/// let tensor_1 = TensorTrait::<u32>::new(
/// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(),
/// );
Expand Down Expand Up @@ -3837,7 +3837,7 @@ trait TensorTrait<T> {
///
/// use orion::operators::tensor::{TensorTrait, Tensor, U32Tensor};
///
/// fn and_example() -> Tensor<usize> {
/// fn xor_example() -> Tensor<usize> {
/// let tensor_1 = TensorTrait::<u32>::new(
/// shape: array![3, 3].span(), data: array![0, 1, 2, 3, 4, 5, 6, 7, 8].span(),
/// );
Expand Down Expand Up @@ -4130,6 +4130,11 @@ trait TensorTrait<T> {
/// ## Returns
///
/// A new `Tensor<T>` of the same shape as the input tensor with selected elements based on provided indices.
///
/// ## Example
///
/// ```rust
/// use array::{ArrayTrait, SpanTrait};
/// use orion::operators::tensor::{TensorTrait, Tensor, I32Tensor, U32Tensor};
/// use orion::numbers::{i32, IntegerTrait};
///
Expand Down Expand Up @@ -4706,6 +4711,8 @@ trait TensorTrait<T> {
///
/// ## Examples
///
/// ```rust
/// use array::{ArrayTrait, SpanTrait};
/// use orion::operators::tensor::{BoolTensor, TensorTrait, Tensor, U32Tensor};
///
/// fn is_inf_example() -> Tensor<bool> {
Expand Down

0 comments on commit dfe51ba

Please sign in to comment.