Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
396 B
1
Indexable
Never
import numpy as np

# Assuming you have defined the lists A, T, 𝜔, and p

# Define the indices k, i, and h that you want to use
k = ...
i = ...
h = ...

# Define a function to compute the sum over m and n
def sum_m_n(m, n):
    return p[m, n] * A[i]**m * T[h]**n

# Compute the sum over all values of m and n
A[k] = np.sum([sum_m_n(m, n) for m in range(4) for n in range(4-m)])