Vectors¶
-
class
sknano.core.math.vectors.Vectors(vectors=None)[source] [edit on github][source]¶ Bases:
sknano.core.collections.UserList,sknano.core.strings.TabulateMixinContainer class for collection of
Vectorobjects.Parameters: vectors ({None, sequence, Vectors}, optional) – if notNone, then a list ofVectorinstance objects or an existingVectorsinstance object.Attributes
AReturn array of vectors. MReturn Vectorsas amatrix.TReturn transpose of Vectorsas anndarray.fmtstrFormat string. lengthsAlias for norms.magnitudesAlias for norms.minmaxMinimum/maximum x, y, z components. normsReturn VectorVector.norms as array.xReturn \(x\) coordinates of Vectorobjects as array.yReturn \(y\) coordinates of Vectorobjects as array.zReturn \(z\) coordinates of Vectorobjects as array.Methods
angle(other)Angles between each Vectorwithother.append(item)asarray()Return Vectorsas anndarray.asmatrix()Return Vectorsas amatrix.clear()copy()count(item)cross(other)Cross product of Vectors withother.dot(other[, out])Dot product of Vectors withother.extend(other)filter(condition[, invert])Filter Vectorsbycondition.index(item, *args)insert(i, item)normalize()Normalize each Vector.pop([i])projection(other)Vector projection of each Vectorontoother.rejection(v)Vector rejection onto other.remove(item)reverse()rezero([epsilon])Set really really small coordinates to zero. rotate([angle, axis, anchor_point, ...])Rotate Vectors coordinates.scale()sort([key, reverse])todict()Return dictof constructor parameters.tolist()Return Vectorsaslisttranslate(t[, fix_anchor_points])Translate Vectors byVectort.