Skip to content

Commit c4d6e11

Browse files
authored
Merge pull request #520 from karankumar-07/patch-1
as_matrix deprecated in pandas - Thanks Karan!
2 parents 0367577 + 0c11476 commit c4d6e11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

beginner_source/data_loading_tutorial.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ def __getitem__(self, idx):
139139
img_name = os.path.join(self.root_dir,
140140
self.landmarks_frame.iloc[idx, 0])
141141
image = io.imread(img_name)
142-
landmarks = self.landmarks_frame.iloc[idx, 1:].as_matrix()
142+
landmarks = self.landmarks_frame.iloc[idx, 1:]
143+
landmarks = np.array([landmarks])
143144
landmarks = landmarks.astype('float').reshape(-1, 2)
144145
sample = {'image': image, 'landmarks': landmarks}
145146

0 commit comments

Comments
 (0)