mlpy.auxiliary.datastructs.Array¶
-
class
mlpy.auxiliary.datastructs.
Array
(size)[source]¶ Bases:
object
The managed array class.
The managed array class pre-allocates memory to the given size automatically resizing as needed.
Parameters: size : int
The size of the array.
Examples
>>> a = Array(5) >>> a[0] = 3 >>> a[1] = 6
Retrieving an elements:
>>> a[0] 3 >>> a[2] 0
Finding the length of the array:
>>> len(a) 2