Implementation of the NCA in python with scipy and numpy