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 not None, then a list of Vector instance objects or an existing Vectors instance object.

Attributes

A Return array of vectors.
M Return Vectors as a matrix.
T Return transpose of Vectors as an ndarray.
fmtstr Format string.
lengths Alias for norms.
magnitudes Alias for norms.
minmax Minimum/maximum x, y, z components.
norms Return Vector Vector.norms 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 with other.
append(item)
asarray() Return Vectors as an ndarray.
asmatrix() Return Vectors as a matrix.
clear()
copy()
count(item)
cross(other) Cross product of Vectors with other.
dot(other[, out]) Dot product of Vectors with other.
extend(other)
filter(condition[, invert]) Filter Vectors by condition.
index(item, *args)
insert(i, item)
normalize() Normalize each Vector.
pop([i])
projection(other) Vector projection of each Vector onto other.
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 dict of constructor parameters.
tolist() Return Vectors as list
translate(t[, fix_anchor_points]) Translate Vectors by Vector t.