<commit_before>import h5py
import numpy as np

def getData(f, name):
    shape = f[name].shape
    # Empty array
    data = np.empty(shape, dtype=np.float64)
    # read_dicect to empty arrays
    f[name].read_direct(data)
    return data


def f(x):
    return np.exp(-x ** 2 / 2) / np.sqrt(2 * np.pi)


a = np.random.rand(100, 1)
b = [f(x) for x in np.linspace(-1, 1, num=100)]


with h5py.File('myfile.hdf5', 'w') as f:
    hip_data = f.create_dataset("hip_strength", data=a)
    knee_data = f.create_dataset("knee_strength", data=b)
    print(getData(f, "knee_strength"))

<commit_msg>Removed own print statement<commit_after>import h5py
import numpy as np

def getData(f, name):
    shape = f[name].shape
    # Empty array
    data = np.empty(shape, dtype=np.float64)
    # read_dicect to empty arrays
    f[name].read_direct(data)
    return data


def f(x):
    return np.exp(-x ** 2 / 2) / np.sqrt(2 * np.pi)


a = np.random.rand(100, 1)
b = [f(x) for x in np.linspace(-1, 1, num=100)]


with h5py.File('myfile.hdf5', 'w') as f:
    hip_data = f.create_dataset("hip_strength", data=a)
    knee_data = f.create_dataset("knee_strength", data=b)


{'fraction_non_alphanumeric': 0.15377932232841007, 'fraction_numerical': 0.029539530842745437, 'mean_word_length': 3.3636363636363638, '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': '2635265', 'n_tokens_mistral': 491, 'n_tokens_neox': 460, 'n_words': 111}