# fmod#

ivy.fmod(x1, x2, /, *, out=None)[source]#

Compute the element-wise remainder of divisions of two arrays.

Parameters:
• x1 (`Union`[`Array`, `NativeArray`]) – First input array.

• x2 (`Union`[`Array`, `NativeArray`]) – Second input array

• out (`Optional`[`Union`[`Array`, `NativeArray`]], default: `None`) – optional output array, for writing the result to.

Return type:

`Union`[`Array`, `NativeArray`]

Returns:

ret – Array with element-wise remainder of divisions.

Examples

```>>> x1 = ivy.array([2, 3, 4])
>>> x2 = ivy.array([1, 5, 2])
>>> ivy.fmod(x1, x2)
ivy.array([ 0,  3,  0])
```
```>>> x1 = ivy.array([ivy.nan, 0, ivy.nan])
>>> x2 = ivy.array([0, ivy.nan, ivy.nan])
>>> ivy.fmod(x1, x2)
ivy.array([ nan,  nan,  nan])
```
Array.fmod(self, x2, /, *, out=None)[source]#

ivy.Array instance method variant of ivy.fmod. This method simply wraps the function, and so the docstring for ivy.fmod also applies to this method with minimal changes.

Parameters:
• self (`Array`) – First input array.

• x2 (`Array`) – Second input array

• out (`Optional`[`Array`], default: `None`) – optional output array, for writing the result to.

Return type:

`Array`

Returns:

ret – Array with element-wise remainder of divisions.

Examples

```>>> x1 = ivy.array([2, 3, 4])
>>> x2 = ivy.array([1, 5, 2])
>>> x1.fmod(x2)
ivy.array([ 0,  3,  0])
```
```>>> x1 = ivy.array([ivy.nan, 0, ivy.nan])
>>> x2 = ivy.array([0, ivy.nan, ivy.nan])
>>> x1.fmod(x2)
ivy.array([ nan,  nan,  nan])
```
Container.fmod(self, x2, /, *, out=None)[source]#

ivy.Container instance method variant of ivy.fmod. This method simply wraps the function, and so the docstring for ivy.fmod also applies to this method with minimal changes.

Parameters:
• self (`Container`) – container with the first input arrays.

• x2 (`Container`) – container with the second input arrays

• out (`Optional`[`Container`], default: `None`) – optional output container, for writing the result to.

Return type:

`Container`

Returns:

ret – Container including arrays with element-wise remainder of divisions.

Examples

```>>> x1 = ivy.Container(a=ivy.array([2, 3, 4]),                               b=ivy.array([ivy.nan, 0, ivy.nan]))
>>> x2 = ivy.Container(a=ivy.array([1, 5, 2]),                               b=ivy.array([0, ivy.nan, ivy.nan]))
>>> x1.fmod(x2)
{
a: ivy.array([ 0,  3,  0])
b: ivy.array([ nan,  nan,  nan])
}
```