# Function erf

• Calculate the error function (Wikipedia entry) for each element in a Tensor. There is a method version of this static function: Tensor.erf.

$$\frac{2}{\sqrt{\pi}}\int_0^{x} e^{-t^2} dt : \forall x \in T$$

### Example

  const t = sm.randn([1337])  // equivalent calls  const a = t.erf()  const b = sm.erf(t)


### Returns

#### Parameters

• ##### tensor: Tensor

Tensor whose values will have their error function calculated

#### Returns Tensor

Generated using TypeDoc