Skip to content

Commit

Permalink
vectors should always keep coordinates as tuple of Python scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrolexa committed Oct 23, 2023
1 parent f2146c1 commit aa2e7c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/apsg/math/_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def __init__(self, *args):
coords = (1, 0)
if len(args) == 1:
if np.asarray(args[0]).shape == Vector2.__shape__:
coords = np.asarray(args[0])
coords = tuple(c.item() for c in np.asarray(args[0]))
elif isinstance(args[0], str):
if args[0].lower() == "x":
coords = (1, 0)
Expand Down Expand Up @@ -375,7 +375,7 @@ def __init__(self, *args):
coords = (1, 0, 0)
elif len(args) == 1:
if np.asarray(args[0]).shape == Vector3.__shape__:
coords = np.asarray(args[0])
coords = tuple(c.item() for c in np.asarray(args[0]))
elif isinstance(args[0], str):
if args[0].lower() == "x":
coords = (1, 0, 0)
Expand Down

0 comments on commit aa2e7c2

Please sign in to comment.