You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[re_with_feedback] Deprecation Issue in Numpy #428
/tmp/ipykernel_4089/4040936680.py:9: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
m_seq[0] = G @ x0
/tmp/ipykernel_4089/4040936680.py:10: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
p_seq[0] = F @ x0
/tmp/ipykernel_4089/4040936680.py:18: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
m_seq[t+1] = G @ x
/tmp/ipykernel_4089/4040936680.py:19: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
p_seq[t+1] = F @ x
<ipython-input-7-ab9e2905e28b>:9: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
m_seq[0] = G @ x0
To me this code looks like matrix multiplication between two vectors where both G and x0 have dimension of 3. Any ideas? What am I missing here.
I think G @ x0 gives a nested array so it has ndim > 0 (e.g. [[0]]), but it is assigned to m_seq[0] as a scalar. So we can probably fix this by [m_seq[0]] = G @ x0.
I can have a go tomorrow once I finish my presentation.
Activity
mmcky commentedon Dec 5, 2024
@HumphreyYang not sure why this error is coming up
To me this code looks like matrix multiplication between two vectors where both G and x0 have dimension of 3. Any ideas? What am I missing here.
HumphreyYang commentedon Dec 5, 2024
I think
G @ x0gives a nested array so it has ndim > 0 (e.g.[[0]]), but it is assigned to m_seq[0] as a scalar. So we can probably fix this by[m_seq[0]] = G @ x0.I can have a go tomorrow once I finish my presentation.
mmcky commentedon Dec 5, 2024
Ah! smart.
We could also try the RHS as
(G @ x0)[0]but it's pretty ugly notation.