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

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: SomeFloat](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: SomeFloat](a: var Tensor[T]; b: Tensor[T])
Element-wise division (in-place)   Source Edit
proc reciprocal[T: SomeFloat](t: Tensor[T]): Tensor[T] {...}{.noInit.}
Return a tensor with the reciprocal 1/x of all elements   Source Edit
proc mreciprocal[T: SomeFloat](t: var Tensor[T])
Apply the reciprocal 1/x in-place to all elements of the Tensor   Source Edit
proc negate[T: SomeSignedInt | SomeFloat](t: Tensor[T]): Tensor[T] {...}{.noInit.}
Return a tensor with all elements negated (10 -> -10)   Source Edit
proc mnegate[T: SomeSignedInt | SomeFloat](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: var Tensor[T])
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(t293197: Tensor): Tensor {...}{.noInit.}

Auto-generated universal version of the function.

The function can be used directly on tensors and will work element-wise.

  Source Edit