From 9182fdc110c7d31429d179aa5c776d592005e3ff Mon Sep 17 00:00:00 2001 From: Stefan Heimersheim Date: Tue, 29 Nov 2022 14:29:35 +0000 Subject: [PATCH] Remove incorrect alternative solution q19 The reshape-based solution for q19 did only work for odd numbered squares, not even ones such as 8x8 squares. --- source/exercises100.ktx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/source/exercises100.ktx b/source/exercises100.ktx index 5e8f8d5..dde5dfa 100644 --- a/source/exercises100.ktx +++ b/source/exercises100.ktx @@ -211,12 +211,6 @@ Z[1::2,::2] = 1 Z[::2,1::2] = 1 print(Z) -# Alternative solution: Using reshaping -arr = np.ones(64,dtype=int) -arr[::2]=0 -arr = arr.reshape((8,8)) -print(arr) - < q20 Consider a (6,7,8) shape array, what is the index (x,y,z) of the 100th element? (★☆☆)