# mlx.core.array.tolist — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.array.tolist

array.tolist(self: array ) → object

  Convert the array to a Python `list`.

  Returns:

    The Python list.

    If the array is a scalar then a standard Python scalar is returned.

    If the array has more than one dimension then the result is a nested list of lists.

    The value type of the list corresponding to the last dimension is either `bool`, `int` or `float` depending on the `dtype` of the array.

  Return type:

    list