Issues reshaping numpy array using Ellipsis
问题 I'm trying to replicate the following batch generator for a project. However I'm having issues reshaping my data. The goal of the function is to take an array of [6000,3000] and reshape it to shape [batch_size, 100,3000,1]. Functioning code I'm trying to replicate def gen(dict_files, aug=False): while True: record_name = random.choice(list(dict_files.keys())) batch_data = dict_files[record_name] all_rows = batch_data['x'] for i in range(batch_size): start_index = random.choice(range(all_rows