#๐Ÿ”’ arrays and vectors

13 messages ยท Page 1 of 1 (latest)

short fractalBOT
#

@glad heath

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

crisp latch
#

Just like when you did R = np.array([0, 0]) There's an R = command that will let you add up your vectors to give you that resultant vector.

valid hearth
#

what is "the resultant" of vectors? the sum?

#

when you add two arrays of the same shape with +, you get a new array of the same shape that is the element-wise sum

#

!e

import numpy as np
arr1 = np.array([1, 2, 3])
arr2 = np.array([4, 5, 6])
print(arr1 + arr2)
print(arr1.sum())
print(np.sum(arr1 + arr2))
short fractalBOT
valid hearth
#

@glad heath make sense?

#

that doesn't have any effect.

crisp latch
#

He could just do R = F1_vec + F2_vec + F3_vec

valid hearth
#

what was the solution?

short fractalBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.

#

๐Ÿ”’ arrays and vectors