Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
5 votes
1 answer
69 views

The main function is apply_noise which applies the noise using the laplacian distribution, the scale of the distribution is b which is calculated with an epsilon value and the sensitivity value that ...
2 votes
3 answers
102 views

I have read close to all posts about this topic now but I can get it working, so sorry if you find this similar to other questions, but I can't just solve it based on existing posts. I find it very ...
3 votes
1 answer
223 views

I intend to design the foundation of an elevated water tank, consisting of a raft with the shape shown in the image below. To do so, I need to determine the raft diameter Dr by solving the following ...
0 votes
1 answer
80 views

I am using jupyter notebook and numpy with the intention of making a program that orthonormalizes any given base following the Gram-Schmidt method for linear algebra. Why doesn't the np.dot() method ...
1 vote
1 answer
129 views

I'm working with a large Pandas DataFrame and a multi-dimensional NumPy array. My goal is to efficiently "broadcast" a specific column of the DataFrame across one or more dimensions of the ...
3 votes
4 answers
157 views

I have 2 arrays 2d and I would like to compare both and count the common values between them, for instance here is my code: import numpy as np def f_m_common(V_R, V_A): r = len(V_A) c = len(...
11 votes
3 answers
427 views

Consider the following executable Python script mtmp.py: import numpy as np import os from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor # `x` is referenced `n_loop` times. def ...
Advice
0 votes
11 replies
69 views

I continue to tinker with some code I found for analysing/categorising sound in .wav files, among others with the amplitude-weighted average and std. deviation of the rfft spectrum (I know, the ...
RJVB's user avatar
  • 820
0 votes
1 answer
171 views

This Python script: import numpy as np img = np.zeros((5, 5, 3), dtype='u1') a = (1, 2, 3) b = (3, 2, 1) img[1:4, 1:4] = a img[1, 1] = b pat = img[1:4, 1:4] win = np.lib.stride_tricks....
Advice
0 votes
4 replies
94 views

I have some code where I read N strings of a given size n into an ndarray, which I would then like to cut in half to obtain a twice longer array of strings size n/2. Is there a numpy operation which ...
RJVB's user avatar
  • 820
Advice
1 vote
7 replies
98 views

I'm tinkering with some code I found that reads in sound data from (stereo) .wav files, and wonder if there is no way to optimise the reading step. Currently, it has the form (assuming a basic 16bit ....
RJVB's user avatar
  • 820
3 votes
3 answers
174 views

I am calling numpy.linalg.inv from within a multiprocessing task forked from the Python multiprocessing module. I compare the Numpy routine to my own inverse routine my_inv. What I see is that the ...
2 votes
2 answers
139 views

I have an arguably common problem, but I don't seem to find any instruction on the web. I have a 3D Numpy array containing the coordinates of N points: In[1]: import numpy as np In[2]: N = 50 In[3]: ...
1 vote
1 answer
105 views

I'm trying to make a simple 3d renderer in CMU Graphics using rotation matrices. When I rotate the camera 90 degrees (left or right), and I try rotating (up / down), it does a "barrel roll" ...
1 vote
3 answers
196 views

I am trying to deploy python code to azure function (linux based, python 3.12). The app works if I exclude pandas (and other package dependency). However, I am getting the following error on azure if ...

15 30 50 per page
1
2 3 4 5
...
7686

AltStyle によって変換されたページ (->オリジナル) /