pointsseq
Sequences of Points.
- class nutils.pointsseq.PointsSequence(ndims)
Bases:
SingletonAbstract base class for a sequence of
Points.- Parameters:
ndims (
int) – The dimension of the point coordinates.
Notes
Subclasses must implement
__len__()andget().- static from_iter(value, ndims)
Create a
PointsSequencefrom an iterator.- Parameters:
- Returns:
sequence
- Return type:
- static uniform(value, length)
Create a uniform
PointsSequence.- Parameters:
- Returns:
sequence
- Return type:
- static empty(ndims)
Create an empty
PointsSequence.- Parameters:
ndims (
int)- Returns:
sequence
- Return type:
- __bool__(self)
Return
bool(self).
- abstractmethod __len__(self)
Return
len(self).
- __iter__(self)
Implement
iter(self).
- __getitem__(index: int) Points
- __getitem__(index: slice | ndarray) PointsSequence
Return
self[index].
- __add__(self, other)
Return
self+other.
- __mul__(other: int) Points
- __mul__(other: PointsSequence) PointsSequence
Return
self*other.
- abstractmethod get(self, index)
Return the points at
index.
- take(self, indices)
Return a selection of this sequence.
- Parameters:
indices (
numpy.ndarray, ndim: 1, dtype: int) – The indices of points of this sequence to select.- Returns:
points – The sequence of selected points.
- Return type:
- compress(self, mask)
Return a selection of this sequence.
- Parameters:
mask (
numpy.ndarray, ndim: 1, dtype: bool) – A boolean mask of points of this sequence to select.- Returns:
sequence – The sequence of selected points.
- Return type:
- repeat(self, count)
Return this sequence repeated
counttimes.- Parameters:
count (
int)- Returns:
sequence – This sequence repeated
counttimes.- Return type:
- product(self, other)
Return the product of this sequence with another sequence.
- Parameters:
other (
PointsSequence)- Returns:
sequence – This product sequence.
- Return type:
- chain(self, other)
Return the chained sequence of this sequence with
other.- Parameters:
other (
PointsSequence)- Returns:
sequence – The chained sequence.
- Return type:
- property tri: ndarray
Triangulation of interior.
A two-dimensional integer array with
ndims+1columns, of which every row defines a simplex by mapping vertices into the list of points.
- property hull: ndarray
Triangulation of the exterior hull.
A two-dimensional integer array with
ndimscolumns, of which every row defines a simplex by mapping vertices into the list of points. Note that the hull often does contain internal element boundaries as the triangulations originating from separate elements are disconnected.