Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vector addition and subtraction operations. #11

Closed
dylannalex opened this issue Dec 8, 2022 · 0 comments
Closed

Add vector addition and subtraction operations. #11

dylannalex opened this issue Dec 8, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@dylannalex
Copy link
Owner

dylannalex commented Dec 8, 2022

Given the vectors $\vec{v}$ and $\vec{w}$, we want to compute $\vec{n} = \vec{v} + \vec{w}$ and $\vec{m} = \vec{v} - \vec{w}$ as shown below:

import curvipy

v = curvipy.Vector([10, 10])
w = curvipy.Vector([5, -5])
n = v + w
m = v - w

This is not possible on Curvipy 1.0.1. To do so, users have to calculate $\vec{n}$ and $\vec{m}$ manually:

import curvipy

v = curvipy.Vector([10, 10])
w = curvipy.Vector([5, -5])
n = curvipy.Vector([10 + 5, 10 + (-5)])
m = curvipy.Vector([10 - 5, 10 - (-5)])
@dylannalex dylannalex added the enhancement New feature or request label Dec 8, 2022
@dylannalex dylannalex self-assigned this Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant