RecursiveArray

class threadcount.fit.RecursiveArray(array=None)[source]

Bases: UserList

Subclass of list which distributes attribute and function calls recursively.

Methods Summary

__call__(*args, **kwargs)

Recursively apply the call function.

array([dtype])

Easily convert to numpy array.

aslist()

Recursively remove the RecursiveArray class and return list of lists.

Methods Documentation

__call__(*args, **kwargs)[source]

Recursively apply the call function.

Returns:

Containing the recursive results of the call.

Return type:

RecursiveArray

array(dtype=<class 'float'>, **kwargs)[source]

Easily convert to numpy array.

Parameters:

dtype (data-type, optional) – numpy dtype, see numpy.array(), by default float

Returns:

Array representing this whole RecursiveArray.

Return type:

numpy ndarray

aslist()[source]

Recursively remove the RecursiveArray class and return list of lists.

Returns:

Should be the internal list object, if nested RecursiveArray then will be list of lists.

Return type:

list