python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How do I selectively right-pad an array containing gaps using numpy/scipy?
Say I have a numpy array
import numpy as np
arr = np.zeros(20)
arr[::4] = func = np.arange(5) # Excuse the setup hack
print(arr)
i.e.
[0. 0. 0. 0. 1. 0. 0. 0. 2. 0. 0. 0. 3. 0. 0. 0. 4. 0. 0. 0.] ...
jtlz2
Votes: 0
Answers: 1
scipy.spatial rotation gives different numbers than rotation with pyquaternion or self implementation
I compared results of rotating a vector with scipy.spatial.transform.Rotation, pyquaternion.Quaternion and my own implementation.
My own and pyquaternion and pretty similar, but Rotation is quite diff...
fbence
Votes: 0
Answers: 1
Floating Point Error in script, which computes a side plane
I have already searched stackoverflow and used different approaches like scipy special library to fix this error, but without success. I always get the Message: "invalid value encountered in doub...
EE_G_RLP
Votes: 0
Answers: 0
How to obtain a clear spectrograph of an oversampled sinusoid with increasing frequency?
Consider following example:
import numpy as np
import scipy as scp
import matplotlib.pyplot as plt
#make signal
deltat = 1e-4
t = np.linspace(0,300000,300001) * deltat
y = np.exp(-t/10)*np.sin(np.pi ...
Karlo
Votes: 0
Answers: 0