Array of integers: TypeError: only length-1 arrays can be converted to Python scalars
📁 Advanced Python Topics, Error, numpy, matplotlib
import scipyimport scipy.fftpackimport cmath import mathimport matplotlib.pyplot as plt import numpy as npfrom scipy import signalfrom scipy.signal import freqs, iirfilterxx = np.linspace(0, 1024, 1024) # range of x valuesbyts = ([0, 0, 0, 0, 1, 0,
I'll answer myself. This will also serve as a reminder for the future.
Instead of virtual machines, install Windows Subsystem for Linux (WSL) - right-click on the Start menu, Windows PowerShell (Administrator),
wsl --install, reboot.Navigate to the project folder via the WSL console. Or open the path to it in File Explorer and on the folder containing the main program file (or on an empty space inside that folder), press Shift+Right-click. A new item ""Open Linux shell here"" will appear in the context menu, click on it.
IMPORTANT!!! The folder name containing main.py must not have spaces. And the main file must be named exactly main.py (this requirement can be changed later).
Log in to leave an answer
Blogs