Skip to content

Commit 350768f

Browse files
committed
doco
1 parent c13f1c7 commit 350768f

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

‎spatialmath/baseposelist.py‎

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
_numtypes = (int, np.int64, float, np.float64)
1414

15-
class SMUserList(UserList, ABC):
15+
class BasePoseList(UserList, ABC):
1616
"""
1717
List properties for spatial math classes
1818
@@ -85,7 +85,7 @@ def _import(self, x, check=True):
8585
@classmethod
8686
def Empty(cls):
8787
"""
88-
Construct an empty instance (SMUserList superclass method)
88+
Construct an empty instance (BasePoseList superclass method)
8989
9090
:return: pose instance with zero values
9191
@@ -104,7 +104,7 @@ def Empty(cls):
104104
@classmethod
105105
def Alloc(cls, n=1):
106106
"""
107-
Construct an instance with N default values (SMUserList superclass method)
107+
Construct an instance with N default values (BasePoseList superclass method)
108108
109109
:param n: Number of values, defaults to 1
110110
:type n: int, optional
@@ -137,9 +137,9 @@ def Alloc(cls, n=1):
137137

138138
def arghandler(self, arg, convertfrom=(), check=True):
139139
"""
140-
Standard constructor support (SMUserList superclass method)
140+
Standard constructor support (BasePoseList superclass method)
141141
142-
:param self: the instance to be initialized :type self: SMUserList
142+
:param self: the instance to be initialized :type self: BasePoseList
143143
instance :param arg: initial value :param convertfrom: list of classes
144144
to accept and convert from :type: tuple of typles :param check: check
145145
value is valid, defaults to True :type check: bool :raises ValueError:
@@ -240,7 +240,7 @@ def _A(self):
240240
@property
241241
def A(self):
242242
"""
243-
Array value of an instance (SMUserList superclass method)
243+
Array value of an instance (BasePoseList superclass method)
244244
245245
:return: NumPy array value of this instance
246246
:rtype: ndarray
@@ -261,7 +261,7 @@ def A(self):
261261

262262
def __getitem__(self, i):
263263
"""
264-
Access value of an instance (SMUserList superclass method)
264+
Access value of an instance (BasePoseList superclass method)
265265
266266
:param i: index of element to return
267267
:type i: int
@@ -298,11 +298,11 @@ def __getitem__(self, i):
298298
end = i.stop
299299
return self.__class__([self.data[k] for k in range(i.start or 0, end, i.step or 1)])
300300
else:
301-
return self.__class__(self.data[i])
301+
return self.__class__(self.data[i], check=False)
302302

303303
def __setitem__(self, i, value):
304304
"""
305-
Assign a value to an instance (SMUserList superclass method)
305+
Assign a value to an instance (BasePoseList superclass method)
306306
307307
:param i: index of element to assign to
308308
:type i: int
@@ -342,7 +342,7 @@ def __ge__(self, other):
342342

343343
def append(self, item):
344344
"""
345-
Append a value to an instance (SMUserList superclass method)
345+
Append a value to an instance (BasePoseList superclass method)
346346
347347
:param x: the value to append
348348
:type x: Quaternion or UnitQuaternion instance
@@ -371,7 +371,7 @@ def append(self, item):
371371

372372
def extend(self, iterable):
373373
"""
374-
Extend sequence of values in an instance (SMUserList superclass method)
374+
Extend sequence of values in an instance (BasePoseList superclass method)
375375
376376
:param x: the value to extend
377377
:type x: instance of same type
@@ -397,7 +397,7 @@ def extend(self, iterable):
397397

398398
def insert(self, i, item):
399399
"""
400-
Insert a value to an instance (SMUserList superclass method)
400+
Insert a value to an instance (BasePoseList superclass method)
401401
402402
:param i: element to insert value before
403403
:type i: int
@@ -432,7 +432,7 @@ def insert(self, i, item):
432432

433433
def pop(self, i=-1):
434434
"""
435-
Pop value from an instance (SMUserList superclass method)
435+
Pop value from an instance (BasePoseList superclass method)
436436
437437
:param i: item in the list to pop, default is last
438438
:type i: int
@@ -464,9 +464,9 @@ def binop(self, right, op, op2=None, list1=True):
464464
Perform binary operation
465465
466466
:param left: left operand
467-
:type left: SMUserList subclass
467+
:type left: BasePoseList subclass
468468
:param right: right operand
469-
:type right: SMUserList subclass, scalar or array
469+
:type right: BasePoseList subclass, scalar or array
470470
:param op: binary operation
471471
:type op: callable
472472
:param op2: binary operation
@@ -479,7 +479,7 @@ def binop(self, right, op, op2=None, list1=True):
479479
480480
The is a helper method for implementing binary operation with overloaded
481481
operators such as ``X * Y`` where ``X`` and ``Y`` are both subclasses
482-
of ``SMUserList``. Each operand has a list of one or more
482+
of ``BasePoseList``. Each operand has a list of one or more
483483
values and this methods computes a list of result values according to:
484484
485485
========= ========== ==== ===================================
@@ -499,7 +499,7 @@ def binop(self, right, op, op2=None, list1=True):
499499
The result is always a list, except for the first case above and
500500
``list1`` is ``False``.
501501
502-
If the right operand is not a ``SMUserList`` subclass, but is a numeric
502+
If the right operand is not a ``BasePoseList`` subclass, but is a numeric
503503
scalar or array then then ``op2`` is invoked
504504
505505
For example::
@@ -589,7 +589,7 @@ def unop(self, op, matrix=False):
589589
Perform unary operation
590590
591591
:param self: operand
592-
:type self: SMUserList subclass
592+
:type self: BasePoseList subclass
593593
:param op: unnary operation
594594
:type op: callable
595595
:param matrix: return array instead of list, default False

0 commit comments

Comments
 (0)