Skip to content

Commit a85f1d2

Browse files
committed
Replace assignment to .shape by np.reshape()
1 parent bd3f0df commit a85f1d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/sounddevice.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2792,7 +2792,7 @@ def _array(buffer, channels, dtype):
27922792
"""Create NumPy array from a buffer object."""
27932793
import numpy as np
27942794
data = np.frombuffer(buffer, dtype=dtype)
2795-
data.shape = -1, channels
2795+
data = np.reshape(data, (-1, channels), copy=False)
27962796
return data
27972797

27982798

0 commit comments

Comments
 (0)