Did I find the right examples for you? yes no

# _arraytools.axis_slice

All Samples(12)  |  Call(9)  |  Derive(0)  |  Import(3)

```from scipy.misc import factorial
from .windows import get_window
from ._arraytools import axis_slice, axis_reverse, odd_ext, even_ext, const_ext

__all__ = ['correlate', 'fftconvolve', 'convolve', 'convolve2d', 'correlate2d',
```
```    zi_shape[axis] = zi.size
zi = np.reshape(zi, zi_shape)
x0 = axis_slice(ext, stop=1, axis=axis)

# Forward filter.
(y, zf) = lfilter(b, a, ext, axis=axis, zi=zi * x0)

# Backward filter.
# Create y0 so zi*y0 broadcasts appropriately.
y0 = axis_slice(y, start=-1, axis=axis)
```
```    if edge > 0:
# Slice the actual signal from the extended signal.
y = axis_slice(y, start=edge, stop=-edge, axis=axis)

return y
```

```from scipy.misc import factorial
from windows import get_window
from _arraytools import axis_slice, axis_reverse, odd_ext, even_ext, const_ext

__all__ = ['correlate', 'fftconvolve', 'convolve', 'convolve2d', 'correlate2d',
```
```    zi_shape[axis] = zi.size
zi = np.reshape(zi, zi_shape)
x0 = axis_slice(ext, stop=1, axis=axis)

# Forward filter.
(y, zf) = lfilter(b, a, ext, axis=axis, zi=zi * x0)

# Backward filter.
# Create y0 so zi*y0 broadcasts appropriately.
y0 = axis_slice(y, start=-1, axis=axis)
```
```    if edge > 0:
# Slice the actual signal from the extended signal.
y = axis_slice(y, start=edge, stop=-edge, axis=axis)

return y
```

```from scipy.signal import lfilter
import numpy as np
from _arraytools import axis_slice, axis_reverse, odd_ext, even_ext, const_ext

```
```    zi_shape[axis] = zi.size
zi = np.reshape(zi, zi_shape)
x0 = axis_slice(ext, stop=1, axis=axis)

# Forward filter.
(y, zf) = lfilter(b, a, ext, zi=zi * x0)

# Backward filter.
# Create y0 so zi*y0 broadcasts appropriately.
y0 = axis_slice(y, start=-1, axis=axis)
```
```    if edge > 0:
# Slice the actual signal from the extended signal.
y = axis_slice(y, start=edge, stop=-edge, axis=axis)

return y
```