Skip to content

Commit e7b9404

Browse files
committed
replace np.tile with np.newaxis
1 parent bb482b2 commit e7b9404

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎spatialmath/base/transformsNd.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def h2e(v):
660660
"""
661661
if isinstance(v, np.ndarray) and len(v.shape) == 2:
662662
# dealing with matrix
663-
return v[:-1, :] / np.tile(v[-1, :], (v.shape[0] - 1, 1))
663+
return v[:-1, :] / v[-1, :][np.newaxis, :]
664664

665665
elif base.isvector(v):
666666
# dealing with shape (N,) array

0 commit comments

Comments
 (0)