Recently I was reading neural network and deep learning by Michael Nielsen [(link)](http://neuralnetworksanddeeplearning.com/chap1.html) and wanted to test the neural network on loan default data. However after quite a few tries I still did not manage to transform my csv format data into the required matrix format by the script. 

The csv file contains 769 variables and 1 boolean default entry. looks like this: 

```
.  v1 v2 v3 ... v770; 
1. 1  2  3 ... 0; 
2. 2  1  2 ... 1; 
...

```

This is how I do my import: 

```
import numpy as np
tr_input = [np.reshape(genfromtxt('training.csv', delimiter=','), (769,10000))]
tr_res = np.reshape(genfromtxt('training2.csv', delimiter=','),(1, 10000))
tr_test = [np.reshape(genfromtxt('testing.csv', delimiter=','), (769,2000))]
tr_test2 = np.reshape(genfromtxt('testing2.csv', delimiter=','), (1, 2000))
test_data = list(zip(tr_test, tr_test2))
training_data = list(zip(tr_input, tr_res))

```

However it returns 

```
Traceback (most recent call last):

  File "<ipython-input-8-de046f78e8ed>", line 3, in <module>
    net.SGD(training_data, 30, 300, 3.0, test_data = test_data)

  File "/Users/Neal/Documents/Sources/network.py", line 71, in SGD
    self.update_mini_batch(mini_batch, eta)

  File "/Users/Neal/Documents/Sources/network.py", line 85, in update_mini_batch
    delta_nabla_b, delta_nabla_w = self.backprop(x, y)

  File "/Users/Neal/Documents/Sources/network.py", line 105, in backprop
    z = np.dot(w, activation)+b

ValueError: shapes (30,769) and (10000,) not aligned: 769 (dim 1) != 10000 (dim 0)

```

Updated: 

Don't know why genfromtxt gives the first entry NAN but pandas works just fine. 

After studying what the original tutorial data, I think I might need to reshape each row data into a (769, 1) array but I don't know how to. 

Attached are the links to download the neural network and my data: 

Neural network: <https://github.com/MichalDanielDobrzanski/DeepLearningPython35> 

Data: <https://drive.google.com/drive/folders/1bQEqgb1o9kKNyv8_IBPlNRci5cfSYwFL?usp=sharing> 
(testing and training are variables and testing2 and training2 are default information booleans, 0 for no default and 1 for default).