Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix plot_NQueens, np.float is deprecated
  • Loading branch information
mikymatt01 committed Dec 22, 2023
commit 1a1153bd66a9124502eb1238c2053df4b932ff3c
2 changes: 1 addition & 1 deletion notebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def plot_NQueens(solution):
board = np.array([2 * int((i + j) % 2) for j in range(n) for i in range(n)]).reshape((n, n))
im = Image.open('images/queen_s.png')
height = im.size[1]
im = np.array(im).astype(np.float) / 255
im = np.array(im).astype(np.float64) / 255
fig = plt.figure(figsize=(7, 7))
ax = fig.add_subplot(111)
ax.set_title('{} Queens'.format(n))
Expand Down
2 changes: 1 addition & 1 deletion notebook4e.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ def plot_NQueens(solution):
board = np.array([2 * int((i + j) % 2) for j in range(n) for i in range(n)]).reshape((n, n))
im = Image.open('images/queen_s.png')
height = im.size[1]
im = np.array(im).astype(np.float) / 255
im = np.array(im).astype(np.float64) / 255
fig = plt.figure(figsize=(7, 7))
ax = fig.add_subplot(111)
ax.set_title('{} Queens'.format(n))
Expand Down