Py5Vector.tolist()

Py5Vector.tolist()

Return the vector’s values as a list.

Examples

1
2
3
4
5
6
7
v1 = py5.Py5Vector(1, 2, 3)

print(v1.tolist())
# [1.0, 2.0, 3.0]

print(type(v1.tolist()))
# <class 'list'>

Description

Return the vector’s values as a list. The length of the list will be equal to the vector’s dimension.

Syntax

tolist() -> list[float]

Updated on January 16, 2022 16:51:21pm UTC