ConceptPythonBeginner Finite elements: hat functions, the weak form, and a heated bar K_all[np.ix_(pair, pair)] += k / h * np.array([[1, -1], [-1, 1]]) # np.ix_: the 2 x 2 block of the pair
ToolPythonIntermediate Gerchberg-Saxton algorithm in NumPy: a phase-only hologram for 25 spots T_spots[np.ix_(c + offsets, c + offsets)] = 1