Compare the structure of llst[lslices] and rlst[rslices].
(llst, rlst, lslices, rslices)
| 410 | return llst |
| 411 | |
| 412 | def cmp_structure(llst, rlst, lslices, rslices): |
| 413 | """Compare the structure of llst[lslices] and rlst[rslices].""" |
| 414 | lshape = slice_shape(llst, lslices) |
| 415 | rshape = slice_shape(rlst, rslices) |
| 416 | if (len(lshape) != len(rshape)): |
| 417 | return -1 |
| 418 | for i in range(len(lshape)): |
| 419 | if lshape[i] != rshape[i]: |
| 420 | return -1 |
| 421 | if lshape[i] == 0: |
| 422 | return 0 |
| 423 | return 0 |
| 424 | |
| 425 | def multislice_assign(llst, rlst, lslices, rslices): |
| 426 | """Return llst after assigning: llst[lslices] = rlst[rslices]""" |
no test coverage detected
searching dependent graphs…