Skip to content

Commit 319ba40

Browse files
committed
create_grid and release 3.0
1 parent 95b3b4d commit 319ba40

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

mitdeeplearning/util.py

+16
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,19 @@ def plot(self, data):
7474
ipythondisplay.display(plt.gcf())
7575

7676
self.tic = time.time()
77+
78+
79+
def create_grid_of_images(xs, size=(5,5)):
80+
""" Combine a list of images into a single image grid by stacking them into an array of shape `size` """
81+
82+
grid = []
83+
counter = 0
84+
for i in range(size[0]):
85+
row = []
86+
for j in range(size[1]):
87+
row.append(xs[counter])
88+
counter += 1
89+
row = np.hstack(row)
90+
grid.append(row)
91+
grid = np.vstack(grid)
92+
return grid

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ def get_dist(pkgname):
2222
setup(
2323
name = 'mitdeeplearning', # How you named your package folder (MyLib)
2424
packages = ['mitdeeplearning'], # Chose the same as "name"
25-
version = '0.2.0', # Start with a small number and increase it with every change you make
25+
version = '0.3.0', # Start with a small number and increase it with every change you make
2626
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
2727
description = 'Official software labs for MIT Introduction to Deep Learning (http://introtodeeplearning.com)', # Give a short description about your library
2828
author = 'Alexander Amini', # Type in your name
2929
author_email = 'introtodeeplearning-staff@mit.edu', # Type in your E-Mail
3030
url = 'http://introtodeeplearning.com', # Provide either the link to your github or to your website
31-
download_url = 'https://github.com/aamini/introtodeeplearning/archive/v0.2.0.tar.gz', # I explain this later on
31+
download_url = 'https://github.com/aamini/introtodeeplearning/archive/v0.3.0.tar.gz', # I explain this later on
3232
keywords = ['deep learning', 'neural networks', 'tensorflow', 'introduction'], # Keywords that define your package best
3333
install_requires=install_deps,
3434
classifiers=[

0 commit comments

Comments
 (0)