Skip to content

Commit

Permalink
Fix numpy warning
Browse files Browse the repository at this point in the history
This warned of numpy 1.25.0 deprecated behavior where a list or dim-0
arrays are treated as scalars. Instead one must index specifically into
the array/list.
  • Loading branch information
patkenneally committed Jun 20, 2024
1 parent 8001da5 commit 2a2b154
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ def state_update_flyby(initial_error, show_plots=False):
BN = rbk.MRP2C(bodyFrame[i, 1:4])
cosList = []
for j in range(len(CSSOrientationList)):
cosList.append(np.dot(CSSOrientationList[j], np.matmul(BN, [0, 0, 1])) + np.random.normal(0, cssSigma, 1))
cosList.append((np.dot(CSSOrientationList[j], np.matmul(BN, [0, 0, 1]))
+ np.random.normal(0, cssSigma, 1))[0])
cssDataMsg.CosValue = np.array(cosList)
cssDataMsg.timeTag = time[i]
omega = expected[0, 4:] + np.random.normal(0, gyroSigma, 3)
Expand Down

0 comments on commit 2a2b154

Please sign in to comment.