Why does numpy.zeros takes up little space
Are you using Linux? Linux has lazy allocation of memory. The underlying calls to malloc and calloc in numpy always ‘succeed’. No memory is actually allocated until the memory is first accessed. The zeros function will use calloc which zeros any allocated memory before it is first accessed. Therfore, numpy need not explicitly zero the … Read more