Skip to content

Commit 8e57a9a

Browse files
apaszkeQuLogic
andauthored
Update lib/matplotlib/cbook/__init__.py
Co-Authored-By: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 9950e89 commit 8e57a9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/cbook/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2016,8 +2016,8 @@ def _unfold(arr, axis, size, step):
20162016
-------
20172017
windows : ndarray, shape (N_1, ..., 1 + (N_axis-size)/step, ..., N_k, size)
20182018
"""
2019-
new_shape = list(arr.shape) + [size]
2020-
new_strides = list(arr.strides) + [arr.strides[axis]]
2019+
new_shape = [*arr.shape, size]
2020+
new_strides = [*arr.strides, arr.strides[axis]]
20212021
new_shape[axis] = (new_shape[axis] - size) // step + 1
20222022
new_strides[axis] = new_strides[axis] * step
20232023
return np.lib.stride_tricks.as_strided(arr,

0 commit comments

Comments
 (0)