This is a rewrite of the tutorial about unsupervised feature learning and deep learning in Python using numpy and scipy. Tutorial: http://ufldl.stanford.edu/wiki/index.php/UFLDL_Tutorial I use numpy for matrices, and scipy.optimize package for the L-BFGS minimization algorithm. Deep learning learns low and high-level features from large amounts of unlabeled data, improving classification on different, labeled, datasets. Deep learning can achieve an accuracy of 98% on the MNIST dataset.