from pyeda.inter import *
X = exprvars('x', 8)
X[::2]
throws: ValueError: expected shape volume to match items
The reason is that the new shape is not correctly adjusted by the step of the slice. It's probably better to forbid using a slice step than to modify the array shape. Modifying the shape would lose some information. SystemVerilog doesn't have slice steps, so it's not a big deal. The only other "correct" way to handle it would be to add step information to the shape. That would be ... complicated.
throws:
ValueError: expected shape volume to match items
The reason is that the new shape is not correctly adjusted by the step of the slice. It's probably better to forbid using a slice step than to modify the array shape. Modifying the shape would lose some information. SystemVerilog doesn't have slice steps, so it's not a big deal. The only other "correct" way to handle it would be to add step information to the shape. That would be ... complicated.