# Python | Numpy MaskedArray .__ imul__

Learn examples from DataCamp guru:

Using the `sympy.combinatorics.Partition().rank ` method, we can get the rank of the array of subarrays, which is passed as parameters to ` sympy.combinatorics.Partition () .rank `.

Syntax: ` sympy.combinatorics.Partition (). rank `
Return: Return the rank of subarrays.

Example # 1:
In this example, we see that using ` sympy.combinatorics.Partition (). rank ` we can get the rank of the array of subarrays.

 ` # import sympy and Partition ` ` from ` ` sympy.combinatorics.partitions ` ` import ` ` Partition ` ` from ` ` sympy ` ` import ` ` * ` ` x, y ` ` = ` ` symbols (` ` `xy` ` `) `   ` # Using sympy.combinatorics.partitions.Partition (). Rank method ` ` gfg ` ` = ` ` Partition ([ ` ` 1 ` `, ` ` 2 ` `], [` ` 4 ` `, ` ` 5 ` `, ` ` 6 ` `], [` ` - 12 , - 11 ]) ````   print (gfg.rank) ```

Output:

119

Example # 2:

` `

``` # impo rt sympy and Relational from sympy.combinatorics.partitions import Partition from sympy import * x, y = symbols ( ` xy` )   # Using sympy.combinatorics.partitions.Partition (). Rank method gfg = Partition ([ 3 ], [ 1 , 91 ], [ 2 ], [ 6 ])   print (gfg.rank) ```

` `

Output:

47

Learn examples from DataCamp guru: