neurots.morphmath.point_array

Point array class.

Classes

DynamicPointArray([initial_capacity, ...])

Store points in a numpy array and automatically resizes when its capacity is reached.

class neurots.morphmath.point_array.DynamicPointArray(initial_capacity=100000, resize_factor=2.0)

Bases: object

Store points in a numpy array and automatically resizes when its capacity is reached.

It is used by algorithms that require the points as a numpy.array and append points incrementally.

Parameters:
  • initial_capacity (int) – The initial capacity of the array.

  • resize_factor (float) – The factor used to increase the capacity of the array.

_resize_capacity()

Resizes the capacity when the size equals capacity.

append(point)

Append a point to the array.

property capacity

Returns the current capacity of the array.

property data

Return filled data.