Fork me on GitHub
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood

Module math_functions

Procs

proc elwise_mul[T](a, b: Tensor[T]): Tensor[T] {.
noInit
.}
Element-wise multiply   Source Edit
proc melwise_mul[T](a: var Tensor[T]; b: Tensor[T])
Element-wise multiply   Source Edit
proc elwise_div[T: SomeInteger](a, b: Tensor[T]): Tensor[T] {.
noInit
.}
Element-wise division   Source Edit
proc elwise_div[T: SomeReal](a, b: Tensor[T]): Tensor[T] {.
noInit
.}
Element-wise division   Source Edit
proc melwise_div[T: SomeInteger](a: var Tensor[T]; b: Tensor[T])
Element-wise division (in-place)   Source Edit
proc melwise_div[T: SomeReal](a: var Tensor[T]; b: Tensor[T])
Element-wise division (in-place)   Source Edit
proc reciprocal[T: SomeReal](t: Tensor[T]): Tensor[T] {.
noInit
.}
Return a tensor with the reciprocal 1/x of all elements   Source Edit
proc mreciprocal[T: SomeReal](t: var Tensor[T])
Apply the reciprocal 1/x in-place to all elements of the Tensor   Source Edit
proc negate[T: SomeSignedInt | SomeReal](t: Tensor[T]): Tensor[T] {.
noInit
.}
Return a tensor with all elements negated (10 -> -10)   Source Edit
proc mnegate[T: SomeSignedInt | SomeReal](t: var Tensor[T])
Negate in-place all elements of the tensor (10 -> -10)   Source Edit
proc `-`[T: SomeNumber](t: Tensor[T]): Tensor[T] {.
noInit
.}
Negate all values of a Tensor   Source Edit
proc abs[T](t: Tensor[T]): Tensor[T] {.
noInit
.}
Return a Tensor with absolute values of all elements   Source Edit
proc mabs[T](t: Tensor[T]): Tensor[T] {.
noInit
.}
Return a Tensor with absolute values of all elements   Source Edit
proc clamp[T](t: Tensor[T]; min, max: T): Tensor[T] {.
noInit
.}
  Source Edit
proc mclamp[T](t: var Tensor[T]; min, max: T)
  Source Edit
proc square[T](x: T): T {.
inline
.}
Return x*x   Source Edit
proc square(t178186: Tensor): Tensor {.
noInit
.}
  Source Edit