0

where these new numbers are coming from?

a=np.arange(21)

np.lib.stride_tricks.as_strided(a,(12,3),strides=(8,4))

enter image description here

Ayoti
  • 21
  • 4
  • 1
    ```np.arange``` will produce 64 bit integers. setting a stride to ```4``` is only valid for 32 bit dtypes. – Kevin May 12 '21 at 16:34
  • 2
    That's a dange of `as_strided`. If you don't get the strides and shape right, you can sample bytes outside the array's data buffer. Shape should be (10,3). – hpaulj May 12 '21 at 16:35

0 Answers0