Fork me on GitHub

src/arraymancer/tensor/operators_comparison

  Source Edit

Procs

proc `!=.`[T](a, b: Tensor[T]): Tensor[bool] {.noinit.}

Tensor element-wise inequality.

And broadcasted element-wise inequality.

Returns:

  • A tensor of boolean
  Source Edit
proc `!=.`[T](t: Tensor[T]; value: T): Tensor[bool] {.noinit.}
Tensor element-wise inequality with scalar Returns:
  • A tensor of boolean
  Source Edit
proc `.!=`[T](a, b: Tensor[T]): Tensor[bool] {.noinit,
    ...deprecated: "Use `!=.` instead".}
Deprecated: Use `!=.` instead
  Source Edit
proc `.<`[T](a, b: Tensor[T]): Tensor[bool] {.noinit,
    ...deprecated: "Use `<.` instead".}
Deprecated: Use `<.` instead
  Source Edit
proc `.<=`[T](a, b: Tensor[T]): Tensor[bool] {.noinit,
    ...deprecated: "Use `<=.` instead".}
Deprecated: Use `<=.` instead
  Source Edit
proc `.==`[T](a, b: Tensor[T]): Tensor[bool] {.noinit,
    ...deprecated: "Use `==.` instead".}
Deprecated: Use `==.` instead
  Source Edit
proc `.>`[T](a, b: Tensor[T]): Tensor[bool] {.noinit,
    ...deprecated: "Use `>.` instead".}
Deprecated: Use `>.` instead
  Source Edit
proc `.>=`[T](a, b: Tensor[T]): Tensor[bool] {.noinit,
    ...deprecated: "Use `>=.` instead".}
Deprecated: Use `>=.` instead
  Source Edit
proc `<.`[T](a, b: Tensor[T]): Tensor[bool] {.noinit.}

Tensor element-wise lesser than.

And broadcasted element-wise lesser than.

Returns:

  • A tensor of boolean
  Source Edit
proc `<.`[T](t: Tensor[T]; value: T): Tensor[bool] {.noinit.}
Tensor element-wise lesser than a scalar Returns:
  • A tensor of boolean
  Source Edit
proc `<=.`[T](a, b: Tensor[T]): Tensor[bool] {.noinit.}

Tensor element-wise lesser or equal.

And broadcasted element-wise lesser or equal.

Returns:

  • A tensor of boolean
  Source Edit
proc `<=.`[T](t: Tensor[T]; value: T): Tensor[bool] {.noinit.}
Tensor element-wise lesser or equal with scalar Returns:
  • A tensor of boolean
  Source Edit
proc `==`[T](a, b: Tensor[T]): bool {.noSideEffect.}
Tensor comparison   Source Edit
proc `==.`[T](a, b: Tensor[T]): Tensor[bool] {.noinit.}

Tensor element-wise equality.

And broadcasted element-wise equality.

Returns:

  • A tensor of boolean
  Source Edit
proc `==.`[T](t: Tensor[T]; value: T): Tensor[bool] {.noinit.}
Tensor element-wise equality with scalar Returns:
  • A tensor of boolean
  Source Edit
proc `>.`[T](a, b: Tensor[T]): Tensor[bool] {.noinit.}

Tensor element-wise greater than.

And broadcasted element-wise greater than.

Returns:

  • A tensor of boolean
  Source Edit
proc `>.`[T](t: Tensor[T]; value: T): Tensor[bool] {.noinit.}
Tensor element-wise greater than a scalar Returns:
  • A tensor of boolean
  Source Edit
proc `>=.`[T](a, b: Tensor[T]): Tensor[bool] {.noinit.}

Tensor element-wise greater or equal.

And broadcasted element-wise greater or equal.

Returns:

  • A tensor of boolean
  Source Edit
proc `>=.`[T](t: Tensor[T]; value: T): Tensor[bool] {.noinit.}
Tensor element-wise greater or equal than a scalar Returns:
  • A tensor of boolean
  Source Edit
proc isNaN(t: Tensor[SomeFloat]): Tensor[bool]
Returns a boolean tensor set to true for each element which is "Not-a-number" or set to false otherwise   Source Edit
proc isNotNaN(t: Tensor[SomeFloat]): Tensor[bool]
Returns a boolean tensor set to false for each element which is "Not-a-number" or set to true otherwise   Source Edit

Templates

template `!=.`[T](value: T; t: Tensor[T]): Tensor[bool]
Element-wise scalar inequality with tensor Returns:
  • A tensor of boolean
  Source Edit
template `<.`[T](value: T; t: Tensor[T]): Tensor[bool]
Element-wise scalar smaller than tensor Returns:
  • A tensor of boolean
  Source Edit
template `<=.`[T](value: T; t: Tensor[T]): Tensor[bool]
Element-wise scalar smaller or equal than tensor Returns:
  • A tensor of boolean
  Source Edit
template `==.`[T](value: T; t: Tensor[T]): Tensor[bool]
Element-wise scalar equality with tensor Returns:
  • A tensor of boolean
  Source Edit
template `>.`[T](value: T; t: Tensor[T]): Tensor[bool]
Element-wise scalar greater than tensor Returns:
  • A tensor of boolean
  Source Edit
template `>=.`[T](value: T; t: Tensor[T]): Tensor[bool]
Element-wise scalar greater or equal than tensor Returns:
  • A tensor of boolean
  Source Edit
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood