8000 make robust to type of passed arg · rocsys/spatialmath-python@c776836 · GitHub
[go: up one dir, main page]

Skip to content

Commit c776836

Browse files
committed
make robust to type of passed arg
1 parent 8e42df7 commit c776836

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spatialmath/base/graphics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,9 +936,10 @@ def ellipsoid(
936936
E = np.linalg.inv(E)
937937

938938
x, y, z = sphere() # unit sphere
939+
centre = smb.getvector(centre, 3, out="col")
939940
e = (
940941
scale * sqrtm(E) @ np.array([x.flatten(), y.flatten(), z.flatten()])
941-
+ np.c_[centre]
942+
+ centre
942943
)
943944
return (
944945
e[0, :].reshape(x.shape),

0 commit comments

Comments
 (0)
0