QUERY · ISSUE
Taking slice of memoryview in Viper function crashes PyBoard
bugpy-core
On a PyBoard v1.1 with firmware 1.13, put the following code into a file:
import micropython
@micropython.viper
def take_memoryview_slice():
ba = bytearray(10)
mv = memoryview(ba)
slice = mv[0:1]
Running take_memoryview_slice() resets the PyBoard.
CANDIDATE · PULL REQUEST
speed_python.rst: Slicing a memoryview causes allocation.
docs
Clarify the reason why slicing a memoryview can't be done in an ISR.