Product of list elements.
(lst)
| 261 | return isinstance(lst, list) |
| 262 | |
| 263 | def prod(lst): |
| 264 | """Product of list elements.""" |
| 265 | if len(lst) == 0: |
| 266 | return 0 |
| 267 | x = lst[0] |
| 268 | for v in lst[1:]: |
| 269 | x *= v |
| 270 | return x |
| 271 | |
| 272 | def strides_from_shape(ndim, shape, itemsize, layout): |
| 273 | """Calculate strides of a contiguous array. Layout is 'C' or |
no test coverage detected