Vectors¶
-
class
sknano.core.math.
Vectors
(vectors=None)[source] [edit on github][source]¶ Bases:
sknano.core.collections.UserList
,sknano.core.strings.TabulateMixin
Container class for collection of
Vector
objects.Parameters: vectors ({None, sequence, Vectors
}, optional) – if notNone
, then a list ofVector
instance objects or an existingVectors
instance object.Attributes
A
Return array of vectors. M
Return Vectors
as amatrix
.T
Return transpose of Vectors
as anndarray
.fmtstr
Format string. lengths
Alias for norms
.magnitudes
Alias for norms
.minmax
Minimum/maximum x, y, z components. norms
Return Vector
Vector.norm
s as array.x
Return \(x\) coordinates of Vector
objects as array.y
Return \(y\) coordinates of Vector
objects as array.z
Return \(z\) coordinates of Vector
objects as array.Methods
angle
(other)Angles between each Vector
withother
.append
(item)asarray
()Return Vectors
as anndarray
.asmatrix
()Return Vectors
as amatrix
.clear
()copy
()count
(item)cross
(other)Cross product of Vector
s withother
.dot
(other[, out])Dot product of Vector
s withother
.extend
(other)filter
(condition[, invert])Filter Vectors
bycondition
.index
(item, *args)insert
(i, item)normalize
()Normalize each Vector
.pop
([i])projection
(other)Vector projection of each Vector
ontoother
.rejection
(v)Vector rejection onto other
.remove
(item)reverse
()rezero
([epsilon])Set really really small coordinates to zero. rotate
([angle, axis, anchor_point, ...])Rotate Vector
s coordinates.scale
()sort
([key, reverse])todict
()Return dict
of constructor parameters.tolist
()Return Vectors
aslist
translate
(t[, fix_anchor_points])Translate Vector
s byVector
t
.