<commit_before>import numpy as np
from scipy import sparse
from hamiltonians.triangular_lattice_model import hamiltonian


Nx = 4
Ny = 4
N = Nx * Ny
spectra = np.empty((20, 30))
for col, J_ppmm in enumerate(np.linspace(0, 10, 20)):
    H = hamiltonian(Nx, Ny, J_ppmm)
    Es = sparse.linalg.eigsh(H, k=30, which='SA', return_eigenvectors=False)
    spectra[:, col] = Es
np.savetxt('spectra_J++--.txt', spectra)<commit_msg>Fixed function call<commit_after>import numpy as np
from scipy import sparse
from spinsys.utils import timer
from hamiltonians.triangular_lattice_model import hamiltonian


Nx = 4
Ny = 4
N = Nx * Ny
spectra = np.empty((30, 20))
t = timer.Timer(20)
for col, J_ppmm in enumerate(np.linspace(0, 10, 20)):
    H = hamiltonian(Nx, Ny, J_ppmm=J_ppmm)
    Es = sparse.linalg.eigsh(H, k=30, which='SA', return_eigenvectors=False)
    spectra[:, col] = Es
    t.progress()
np.savetxt('spectra_J++--.txt', spectra)
{'fraction_non_alphanumeric': 0.13498920086393087, 'fraction_numerical': 0.03023758099352052, 'mean_word_length': 4.652439024390244, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '202996', 'n_tokens_mistral': 399, 'n_tokens_neox': 363, 'n_words': 94}