Flatten a sequence in place.
(seq)
| 338 | #---- |
| 339 | #####-------------------------------------------------------------------------- |
| 340 | def flatten_inplace(seq): |
| 341 | """Flatten a sequence in place.""" |
| 342 | k = 0 |
| 343 | while (k != len(seq)): |
| 344 | while hasattr(seq[k], '__iter__'): |
| 345 | seq[k:(k + 1)] = seq[k] |
| 346 | k += 1 |
| 347 | return seq |
| 348 | |
| 349 | |
| 350 | def apply_along_axis(func1d, axis, arr, *args, **kwargs): |
no outgoing calls
no test coverage detected
searching dependent graphs…