utils

This module contains some utility functions

source

val2list

 val2list (val, lsize=1)

Convert an element (nonlist value) to a list of 1 element

val2list(2)
[2]
val2list(2,lsize=5)
[2, 2, 2, 2, 2]
val2list([2,3])
[2, 3]
val2list(np.array([1,2,3]))
array([1, 2, 3])

source

create_dir

 create_dir (path_dir)