Skip to content

Commit ba0c562

Browse files
authored
Replace removed np.float alias with float in plot_NQueens (notebook4e.py) (#1289)
np.float was removed in NumPy 1.24+; use the builtin float (behavior-preserving) in notebook4e.py's plot_NQueens, matching the same fix already applied to notebook.py in #1309.
1 parent 8a96072 commit ba0c562

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎notebook4e.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ def plot_NQueens(solution):
10971097
board = np.array([2 * int((i + j) % 2) for j in range(n) for i in range(n)]).reshape((n, n))
10981098
im = Image.open('images/queen_s.png')
10991099
height = im.size[1]
1100-
im = np.array(im).astype(np.float) / 255
1100+
im = np.array(im).astype(float) / 255
11011101
fig = plt.figure(figsize=(7, 7))
11021102
ax = fig.add_subplot(111)
11031103
ax.set_title('{} Queens'.format(n))

0 commit comments

Comments
 (0)