@@ -299,8 +299,8 @@ def Xaxis(cls):
299299
300300 Examples
301301 --------
302- >>> Vector.Xaxis()
303- Vector(1.000, 0.000, 0.000)
302+ >>> Vector.Xaxis() == [1, 0, 0]
303+ True
304304
305305 """
306306 return cls (1.0 , 0.0 , 0.0 )
@@ -316,8 +316,8 @@ def Yaxis(cls):
316316
317317 Examples
318318 --------
319- >>> Vector.Yaxis()
320- Vector(0.000, 1.000, 0.000)
319+ >>> Vector.Yaxis() == [0, 1, 0]
320+ True
321321
322322 """
323323 return cls (0.0 , 1.0 , 0.0 )
@@ -333,8 +333,8 @@ def Zaxis(cls):
333333
334334 Examples
335335 --------
336- >>> Vector.Zaxis()
337- Vector(0.000, 0.000, 1.000)
336+ >>> Vector.Zaxis() == [0, 0, 1]
337+ True
338338
339339 """
340340 return cls (0.0 , 0.0 , 1.0 )
@@ -357,8 +357,9 @@ def from_start_end(cls, start, end):
357357
358358 Examples
359359 --------
360- >>> Vector.from_start_end([1.0, 0.0, 0.0], [1.0, 1.0, 0.0])
361- Vector(0.000, 1.000, 0.000)
360+ >>> vector = Vector.from_start_end([1.0, 0.0, 0.0], [1.0, 1.0, 0.0])
361+ >>> print(vector)
362+ Vector(x=0.000, y=1.000, z=0.000)
362363
363364 """
364365 v = subtract_vectors (end , start )
@@ -389,8 +390,8 @@ def transform_collection(collection, X):
389390 >>> vectors = [u]
390391 >>> Vector.transform_collection(vectors, R)
391392 >>> v = vectors[0]
392- >>> v
393- Vector(0.000, 1.000, 0.000)
393+ >>> print(v)
394+ Vector(x= 0.000, y= 1.000, z= 0.000)
394395 >>> u is v
395396 True
396397
@@ -423,8 +424,8 @@ def transformed_collection(collection, X):
423424 >>> vectors = [u]
424425 >>> vectors = Vector.transformed_collection(vectors, R)
425426 >>> v = vectors[0]
426- >>> v
427- Vector(0.000, 1.000, 0.000)
427+ >>> print(v)
428+ Vector(x= 0.000, y= 1.000, z= 0.000)
428429 >>> u is v
429430 False
430431
@@ -449,7 +450,8 @@ def length_vectors(vectors):
449450
450451 Examples
451452 --------
452- >>> Vector.length_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]])
453+ >>> result = Vector.length_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]])
454+ >>> print(result)
453455 [1.0, 2.0]
454456
455457 """
@@ -471,8 +473,9 @@ def sum_vectors(vectors):
471473
472474 Examples
473475 --------
474- >>> Vector.sum_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]])
475- Vector(3.000, 0.000, 0.000)
476+ >>> result = Vector.sum_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]])
477+ >>> print(result)
478+ Vector(x=3.000, y=0.000, z=0.000)
476479
477480 """
478481 return Vector (* [sum (axis ) for axis in zip (* vectors )])
@@ -495,7 +498,8 @@ def dot_vectors(left, right):
495498
496499 Examples
497500 --------
498- >>> Vector.dot_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]], [[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]])
501+ >>> result = Vector.dot_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]], [[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]])
502+ >>> print(result)
499503 [1.0, 4.0]
500504
501505 """
@@ -519,8 +523,9 @@ def cross_vectors(left, right):
519523
520524 Examples
521525 --------
522- >>> Vector.cross_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]], [[0.0, 1.0, 0.0], [0.0, 0.0, 2.0]])
523- [Vector(0.000, 0.000, 1.000), Vector(0.000, -4.000, 0.000)]
526+ >>> result = Vector.cross_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]], [[0.0, 1.0, 0.0], [0.0, 0.0, 2.0]])
527+ >>> print(result)
528+ [Vector(x=0.000, y=0.000, z=1.000), Vector(x=0.000, y=-4.000, z=0.000)]
524529
525530 """
526531 # cross_vectors(u,v) from src\compas\geometry\_core\_algebra.py
@@ -544,7 +549,8 @@ def angles_vectors(left, right):
544549
545550 Examples
546551 --------
547- >>> Vector.angles_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]], [[0.0, 1.0, 0.0], [0.0, 0.0, 2.0]])
552+ >>> result = Vector.angles_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]], [[0.0, 1.0, 0.0], [0.0, 0.0, 2.0]])
553+ >>> print(result)
548554 [(1.5707963267948966, 4.71238898038469), (1.5707963267948966, 4.71238898038469)]
549555
550556 """
@@ -568,7 +574,8 @@ def angle_vectors(left, right):
568574
569575 Examples
570576 --------
571- >>> Vector.angle_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]], [[0.0, 1.0, 0.0], [0.0, 0.0, 2.0]])
577+ >>> result = Vector.angle_vectors([[1.0, 0.0, 0.0], [2.0, 0.0, 0.0]], [[0.0, 1.0, 0.0], [0.0, 0.0, 2.0]])
578+ >>> print(result)
572579 [1.5707963267948966, 1.5707963267948966]
573580
574581 """
@@ -781,8 +788,9 @@ def cross(self, other):
781788 --------
782789 >>> u = Vector(1.0, 0.0, 0.0)
783790 >>> v = Vector(0.0, 1.0, 0.0)
784- >>> u.cross(v)
785- Vector(0.000, 0.000, 1.000)
791+ >>> w = u.cross(v)
792+ >>> print(w)
793+ Vector(x=0.000, y=0.000, z=1.000)
786794
787795 """
788796 return Vector (* cross_vectors (self , other ))
@@ -896,8 +904,8 @@ def transform(self, T):
896904 >>> u = Vector(1.0, 0.0, 0.0)
897905 >>> R = Rotation.from_axis_and_angle([0.0, 0.0, 1.0], math.radians(90))
898906 >>> u.transform(R)
899- >>> u
900- Vector(0.000, 1.000, 0.000)
907+ >>> print(u)
908+ Vector(x= 0.000, y= 1.000, z= 0.000)
901909
902910 """
903911 point = transform_vectors ([self ], T )[0 ]
@@ -924,8 +932,8 @@ def transformed(self, T):
924932 >>> u = Vector(1.0, 0.0, 0.0)
925933 >>> R = Rotation.from_axis_and_angle([0.0, 0.0, 1.0], math.radians(90))
926934 >>> v = u.transformed(R)
927- >>> v
928- Vector(0.000, 1.000, 0.000)
935+ >>> print(v)
936+ Vector(x= 0.000, y= 1.000, z= 0.000)
929937
930938 """
931939 vector = self .copy ()
0 commit comments