Fork me on GitHub

src/arraymancer/tensor/ufunc

Search:
Group by:
  Source Edit

NOTE: This should be {.noinit.}, but this is blocked by: https://github.com/nim-lang/Nim/issues/16253NOTE: This should be {.noinit.}, see above.

Procs

proc arccos[T](t`gensym9: Tensor[T]): Tensor[T] {.noinit.}
Applies arccos to every element of the input tensor t and returns a copy.   Source Edit
proc arccos[T](t`gensym9: Tensor[T]): Tensor[T] {.noinit.}
Applies arccos to every element of the input tensor t and returns a copy.   Source Edit
proc arccosh[T](t`gensym12: Tensor[T]): Tensor[T] {.noinit.}
Applies arccosh to every element of the input tensor t and returns a copy.   Source Edit
proc arccosh[T](t`gensym12: Tensor[T]): Tensor[T] {.noinit.}
Applies arccosh to every element of the input tensor t and returns a copy.   Source Edit
proc arcsin[T](t`gensym10: Tensor[T]): Tensor[T] {.noinit.}
Applies arcsin to every element of the input tensor t and returns a copy.   Source Edit
proc arcsin[T](t`gensym10: Tensor[T]): Tensor[T] {.noinit.}
Applies arcsin to every element of the input tensor t and returns a copy.   Source Edit
proc arcsinh[T](t`gensym13: Tensor[T]): Tensor[T] {.noinit.}
Applies arcsinh to every element of the input tensor t and returns a copy.   Source Edit
proc arcsinh[T](t`gensym13: Tensor[T]): Tensor[T] {.noinit.}
Applies arcsinh to every element of the input tensor t and returns a copy.   Source Edit
proc arctan[T](t`gensym11: Tensor[T]): Tensor[T] {.noinit.}
Applies arctan to every element of the input tensor t and returns a copy.   Source Edit
proc arctan[T](t`gensym11: Tensor[T]): Tensor[T] {.noinit.}
Applies arctan to every element of the input tensor t and returns a copy.   Source Edit
proc arctanh[T](t`gensym14: Tensor[T]): Tensor[T] {.noinit.}
Applies arctanh to every element of the input tensor t and returns a copy.   Source Edit
proc arctanh[T](t`gensym14: Tensor[T]): Tensor[T] {.noinit.}
Applies arctanh to every element of the input tensor t and returns a copy.   Source Edit
proc asType[T: SomeNumber; U: Complex](t: Tensor[T]; typ: typedesc[U]): Tensor[U]
Apply type conversion on the whole tensor   Source Edit
proc asType[T; U: not Complex](t: Tensor[T]; typ: typedesc[U]): Tensor[U]
Apply type conversion on the whole tensor. This is a no-op if T is the same as U.   Source Edit
proc cbrt[T](t`gensym4: Tensor[T]): Tensor[T] {.noinit.}

Applies cbrt to every element of the input tensor t and returns a copy.

Note that the scalar cbrt function computes the cube root of its input.

  Source Edit
proc cbrt[T](t`gensym4: Tensor[T]): Tensor[T] {.noinit.}

Applies cbrt to every element of the input tensor t and returns a copy.

Note that the scalar cbrt function computes the cube root of its input.

  Source Edit
proc ceil[T](t`gensym26: Tensor[T]): Tensor[T] {.noinit.}

Applies ceil to every element of the input tensor t and returns a copy.

Note that the scalar ceil function returns the smallest integer not smaller than its input to the decimal point.

  Source Edit
proc ceil[T](t`gensym26: Tensor[T]): Tensor[T] {.noinit.}

Applies ceil to every element of the input tensor t and returns a copy.

Note that the scalar ceil function returns the smallest integer not smaller than its input to the decimal point.

  Source Edit
proc cos[T](t`gensym15: Tensor[T]): Tensor[T] {.noinit.}
Applies cos to every element of the input tensor t and returns a copy.   Source Edit
proc cos[T](t`gensym15: Tensor[T]): Tensor[T] {.noinit.}
Applies cos to every element of the input tensor t and returns a copy.   Source Edit
proc cosh[T](t`gensym16: Tensor[T]): Tensor[T] {.noinit.}
Applies cosh to every element of the input tensor t and returns a copy.   Source Edit
proc cosh[T](t`gensym16: Tensor[T]): Tensor[T] {.noinit.}
Applies cosh to every element of the input tensor t and returns a copy.   Source Edit
proc degToRad[T](t`gensym29: Tensor[T]): Tensor[T] {.noinit.}
Applies degToRad to every element of the input tensor t and returns a copy.   Source Edit
proc degToRad[T](t`gensym29: Tensor[T]): Tensor[T] {.noinit.}
Applies degToRad to every element of the input tensor t and returns a copy.   Source Edit
proc erf[T](t`gensym21: Tensor[T]): Tensor[T] {.noinit.}

Applies erf to every element of the input tensor t and returns a copy.

Note that the scalar erf function computes the Gauss error function of its input.

  Source Edit
proc erf[T](t`gensym21: Tensor[T]): Tensor[T] {.noinit.}

Applies erf to every element of the input tensor t and returns a copy.

Note that the scalar erf function computes the Gauss error function of its input.

  Source Edit
proc erfc[T](t`gensym22: Tensor[T]): Tensor[T] {.noinit.}

Applies erfc to every element of the input tensor t and returns a copy.

Note that the scalar erfc function computes the complementary error function of its input.

  Source Edit
proc erfc[T](t`gensym22: Tensor[T]): Tensor[T] {.noinit.}

Applies erfc to every element of the input tensor t and returns a copy.

Note that the scalar erfc function computes the complementary error function of its input.

  Source Edit
proc exp[T](t`gensym8: Tensor[T]): Tensor[T] {.noinit.}
Applies exp to every element of the input tensor t and returns a copy.   Source Edit
proc exp[T](t`gensym8: Tensor[T]): Tensor[T] {.noinit.}
Applies exp to every element of the input tensor t and returns a copy.   Source Edit
proc fac[T](t`gensym1: Tensor[T]): Tensor[T] {.noinit.}

Applies fac to every element of the input tensor t and returns a copy.

Note that the scalar fac function computes the factorial of its input, which must be a non-negative integer.

  Source Edit
proc fac[T](t`gensym1: Tensor[T]): Tensor[T] {.noinit.}

Applies fac to every element of the input tensor t and returns a copy.

Note that the scalar fac function computes the factorial of its input, which must be a non-negative integer.

  Source Edit
proc floor[T](t`gensym25: Tensor[T]): Tensor[T] {.noinit.}

Applies floor to every element of the input tensor t and returns a copy.

Note that the scalar floor function returns the largest integer not greater than its input to the decimal point.

  Source Edit
proc floor[T](t`gensym25: Tensor[T]): Tensor[T] {.noinit.}

Applies floor to every element of the input tensor t and returns a copy.

Note that the scalar floor function returns the largest integer not greater than its input to the decimal point.

  Source Edit
proc gamma[T](t`gensym23: Tensor[T]): Tensor[T] {.noinit.}

Applies gamma to every element of the input tensor t and returns a copy.

Note that the scalar gamma function computes the gamma function of its input.

  Source Edit
proc gamma[T](t`gensym23: Tensor[T]): Tensor[T] {.noinit.}

Applies gamma to every element of the input tensor t and returns a copy.

Note that the scalar gamma function computes the gamma function of its input.

  Source Edit
proc isNaN[T](t`gensym2: Tensor[T]): Tensor[T] {.noinit.}
Applies isNaN to every element of the input tensor t and returns a copy.   Source Edit
proc isNaN[T](t`gensym2: Tensor[T]): Tensor[T] {.noinit.}
Applies isNaN to every element of the input tensor t and returns a copy.   Source Edit
proc lgamma[T](t`gensym24: Tensor[T]): Tensor[T] {.noinit.}

Applies lgamma to every element of the input tensor t and returns a copy.

Note that the scalar lgamma function computes the natural logarithm of the gamma function of its input.

  Source Edit
proc lgamma[T](t`gensym24: Tensor[T]): Tensor[T] {.noinit.}

Applies lgamma to every element of the input tensor t and returns a copy.

Note that the scalar lgamma function computes the natural logarithm of the gamma function of its input.

  Source Edit
proc ln[T](t`gensym5: Tensor[T]): Tensor[T] {.noinit.}
Applies ln to every element of the input tensor t and returns a copy.   Source Edit
proc ln[T](t`gensym5: Tensor[T]): Tensor[T] {.noinit.}
Applies ln to every element of the input tensor t and returns a copy.   Source Edit
proc log2[T](t`gensym7: Tensor[T]): Tensor[T] {.noinit.}
Applies log2 to every element of the input tensor t and returns a copy.   Source Edit
proc log2[T](t`gensym7: Tensor[T]): Tensor[T] {.noinit.}
Applies log2 to every element of the input tensor t and returns a copy.   Source Edit
proc log10[T](t`gensym6: Tensor[T]): Tensor[T] {.noinit.}
Applies log10 to every element of the input tensor t and returns a copy.   Source Edit
proc log10[T](t`gensym6: Tensor[T]): Tensor[T] {.noinit.}
Applies log10 to every element of the input tensor t and returns a copy.   Source Edit
proc radToDeg[T](t`gensym30: Tensor[T]): Tensor[T] {.noinit.}
Applies radToDeg to every element of the input tensor t and returns a copy.   Source Edit
proc radToDeg[T](t`gensym30: Tensor[T]): Tensor[T] {.noinit.}
Applies radToDeg to every element of the input tensor t and returns a copy.   Source Edit
proc round[T](t`gensym28: Tensor[T]): Tensor[T] {.noinit.}

Applies round to every element of the input tensor t and returns a copy.

Note that the scalar round function rounds its input to the closest integer. Unlike nim's standard library version, this function does not take a places argument. If you need to round to a specific number of decimal places, use map_inline instead (e.g. t.map_inline(round(x, places = 3))).

  Source Edit
proc round[T](t`gensym28: Tensor[T]): Tensor[T] {.noinit.}

Applies round to every element of the input tensor t and returns a copy.

Note that the scalar round function rounds its input to the closest integer. Unlike nim's standard library version, this function does not take a places argument. If you need to round to a specific number of decimal places, use map_inline instead (e.g. t.map_inline(round(x, places = 3))).

  Source Edit
proc sin[T](t`gensym18: Tensor[T]): Tensor[T] {.noinit.}
Applies sin to every element of the input tensor t and returns a copy.   Source Edit
proc sin[T](t`gensym18: Tensor[T]): Tensor[T] {.noinit.}
Applies sin to every element of the input tensor t and returns a copy.   Source Edit
proc sinh[T](t`gensym17: Tensor[T]): Tensor[T] {.noinit.}
Applies sinh to every element of the input tensor t and returns a copy.   Source Edit
proc sinh[T](t`gensym17: Tensor[T]): Tensor[T] {.noinit.}
Applies sinh to every element of the input tensor t and returns a copy.   Source Edit
proc sqrt[T](t`gensym3: Tensor[T]): Tensor[T] {.noinit.}

Applies sqrt to every element of the input tensor t and returns a copy.

Note that the scalar sqrt function computes the square root of its input.

  Source Edit
proc sqrt[T](t`gensym3: Tensor[T]): Tensor[T] {.noinit.}

Applies sqrt to every element of the input tensor t and returns a copy.

Note that the scalar sqrt function computes the square root of its input.

  Source Edit
proc tan[T](t`gensym19: Tensor[T]): Tensor[T] {.noinit.}
Applies tan to every element of the input tensor t and returns a copy.   Source Edit
proc tan[T](t`gensym19: Tensor[T]): Tensor[T] {.noinit.}
Applies tan to every element of the input tensor t and returns a copy.   Source Edit
proc tanh[T](t`gensym20: Tensor[T]): Tensor[T] {.noinit.}
Applies tanh to every element of the input tensor t and returns a copy.   Source Edit
proc tanh[T](t`gensym20: Tensor[T]): Tensor[T] {.noinit.}
Applies tanh to every element of the input tensor t and returns a copy.   Source Edit
proc trunc[T](t`gensym27: Tensor[T]): Tensor[T] {.noinit.}

Applies trunc to every element of the input tensor t and returns a copy.

Note that the scalar trunc function truncates its input to the decimal point.

  Source Edit
proc trunc[T](t`gensym27: Tensor[T]): Tensor[T] {.noinit.}

Applies trunc to every element of the input tensor t and returns a copy.

Note that the scalar trunc function truncates its input to the decimal point.

  Source Edit

Templates

template makeUniversal(func_name: untyped; docSuffix = "")

Lift an unary function into an exported universal function.

 Universal functions apply element-wise.

makeUniversal does not work when the internal type of the Tensor changes, for example, a function "isEven: int -> bool". Use map in this case instead instead

  Source Edit
template makeUniversalLocal(func_name: untyped)

Lift an unary function into a non-exported universal function.

 Universal functions apply element-wise.

makeUniversalLocal does not work when the internal type of the Tensor changes, for example, a function "isEven: int -> bool". Use map in this case instead instead

  Source Edit
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood