forked from M-Labs/artiq
Strided slicing of one-dimensional arrays (i.e. with non-trivial steps) might have previously been working, but would have had different semantics, as all slices were copies rather than a view into the original data. Fixing this in the future will require adding support for an index stride field/tuple to our array representation (and all the associated indexing logic). GitHub: Fixes #1627.
17 lines
476 B
Python
17 lines
476 B
Python
# RUN: %python -m artiq.compiler.testbench.inferencer +diag %s >%t
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
# CHECK-L: ${LINE:+1}: error: array cannot be invoked with the arguments ()
|
|
a = array()
|
|
|
|
b = array([1, 2, 3])
|
|
|
|
# CHECK-L: ${LINE:+1}: error: too many indices for array of dimension 1
|
|
b[1, 2]
|
|
|
|
# CHECK-L: ${LINE:+1}: error: strided slicing not yet supported for NumPy arrays
|
|
b[::-1]
|
|
|
|
# CHECK-L: ${LINE:+1}: error: array attributes cannot be assigned to
|
|
b.shape = (5, )
|