<commit_before>import time
import finufft
import numpy as np

np.random.seed(42)

acc = 1.e-9
N = int(1e6)
M = int(1e6)
x = np.random.uniform(-np.pi, np.pi, N)
c = np.random.randn(N) + 1.j * np.random.randn(N)

strt = time.time()
F = finufft.nufft1d1(x, c, M, acc, 1)
print("Finished nufft in {0:.2e} seconds. Checking..."
      .format(time.time()-strt))

n = 142519
Ftest = 0.0
for j in range(M):
    Ftest += c[j] * np.exp(n * x[j] * 1.j) / M
Fmax = np.max(np.abs(F));
err = np.abs((F[n + N // 2] - Ftest) / Fmax)
print("Error relative to max of F: {0}".format(err))
<commit_msg>removed 1/M prefactor in all type-1 definitions and test codes; note change from CMCL NUFFT<commit_after>import time
import finufft
import numpy as np

np.random.seed(42)

acc = 1.e-9
N = int(1e6)
M = int(1e6)
x = np.random.uniform(-np.pi, np.pi, N)
c = np.random.randn(N) + 1.j * np.random.randn(N)

strt = time.time()
F = finufft.nufft1d1(x, c, M, acc, 1)
print("Finished nufft in {0:.2e} seconds. Checking..."
      .format(time.time()-strt))

n = 142519
Ftest = 0.0
for j in range(M):
    Ftest += c[j] * np.exp(n * x[j] * 1.j)
Fmax = np.max(np.abs(F));
err = np.abs((F[n + N // 2] - Ftest) / Fmax)
print("Error relative to max of F: {0}".format(err))

{'fraction_non_alphanumeric': 0.19547657512116318, 'fraction_numerical': 0.0420032310177706, 'mean_word_length': 3.243150684931507, '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': '5018939', 'n_tokens_mistral': 594, 'n_tokens_neox': 569, 'n_words': 147}