Artificial Neural Network class written in Python