-
Notifications
You must be signed in to change notification settings - Fork 0
/
problem2.py
52 lines (34 loc) · 1.14 KB
/
problem2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Problem 2
import numpy as np
positions = np.array(
[[0.0, 0.0, 0.0], [1.34234, 1.34234, 0.0],
[1.34234, 0.0, 1.34234], [0.0, 1.34234, 1.34234]])
t = np.array([1.34234, -1.34234, -1.34234])
positions2 = np.array([[1.5, -1.5, 3], [-1.5, -1.5, -3]])
t2 = np.array([-1.5, 1.5, 3])
# replace NotImplemented with your solution
# (a) shape and dimension of positions
result2a_shape = NotImplemented
result2a_dimensions = NotImplemented
print(f"2a shape of positions: {result2a_shape}")
print(f"2a dimensions of positions: {result2a_dimensions}")
# (b) shape and dimension of t
result2b_shape = NotImplemented
result2b_dimensions = NotImplemented
print(f"2b shape of t: {result2b_shape}")
print(f"2b dimensions of t: {result2b_dimensions}")
# (c)
result2c = NotImplemented
# (d) (i)
result2d = NotImplemented
# (e)
result2e = NotImplemented
result2e_shape = NotImplemented
result2e_dimensions = NotImplemented
print(f"2e all y: {result2e}")
print(f"2e shape of all y: {result2e_shape}")
print(f"2e dimensions of all y: {result2e_dimensions}")
# (f)
result2f = NotImplemented
# (g)
# add your function definition here