Skip to content

Commit 6e86af8

Browse files
python3
1 parent 06c6029 commit 6e86af8

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

numpy_class/manual_data_loading.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# https://deeplearningcourses.com/c/deep-learning-prerequisites-the-numpy-stack-in-python
2+
# https://www.udemy.com/deep-learning-prerequisites-the-numpy-stack-in-python
3+
4+
# NOTE: in class, we assumed the current working directory
5+
# was linear_regression_class
6+
# in this file, we assume you are running the script
7+
# from the directory this file is in
8+
9+
import numpy as np
10+
11+
X = []
12+
13+
for line in open('../linear_regression_class/data_2d.csv'):
14+
row = line.split(',')
15+
sample = map(float, row)
16+
X.append(sample)
17+
18+
X = np.array(X)
19+
print X
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# https://deeplearningcourses.com/c/deep-learning-prerequisites-the-numpy-stack-in-python
2+
# https://www.udemy.com/deep-learning-prerequisites-the-numpy-stack-in-python
3+
4+
# NOTE: in class, we assumed the current working directory
5+
# was linear_regression_class
6+
# in this file, we assume you are running the script
7+
# from the directory this file is in
8+
9+
import numpy as np
10+
11+
X = []
12+
13+
for line in open('../../linear_regression_class/data_2d.csv'):
14+
row = line.split(',')
15+
sample = list(map(float, row))
16+
X.append(sample)
17+
18+
X = np.array(X)
19+
print(X)

0 commit comments

Comments
 (0)