to_list#

sionna.phy.utils.to_list(x: Any) List | None[source]#

Converts the input to a list.

Parameters:

x (Any) – Input to be converted to a list. Can be list, float, int, str, or None.

Outputs:

x – Input converted to a list, or None if input is None.

Examples

from sionna.phy.utils import to_list

print(to_list(5))
# [5]
print(to_list([1, 2, 3]))
# [1, 2, 3]
print(to_list("hello"))
# ['hello']