All Questions
7,209 questions
Best practices
0
votes
3
replies
35
views
How does spectral centroid behave? (breaking-wave / bubble noise)
I’m working on an underwater acoustics project (student project) analyzing the sound of breaking waves. When a wave breaks, bubbles are entrained and their oscillations generate broadband underwater ...
Advice
2
votes
11
replies
89
views
Python algorithm to automatically propagate inequalities transitively
I am trying to build a Python algorithm that can transitively propagate inequalities between objects. For example, if I know that A < B and B < C, I want the system to automatically infer that A ...
3
votes
0
answers
145
views
Transform points from one coordinate system into another, given only two poses
I know, this should be easy to solve, but I have been struggling with it for a few days and have not been able to find the problem.
I have given two poses of the same object in two different ...
3
votes
1
answer
63
views
Opencl Dot product kernel fails on specific data
I have a opencl kernel that performs a dot product multiplication. When I run it on a random numpy array created by rng.random, it gives a percent error compared to numpy of -0.011454765, but when I ...
-2
votes
1
answer
299
views
Self-recursing-iterative functions in Python
I was writing an implementation of the Knuth up-arrow notation, and I realized I had a problem. To make it work, I would have to iteratively stack more and more references to a function containing my &...
0
votes
2
answers
82
views
Math CAPTCHA don't work with dividing - how to fix? [closed]
I’m writing a Selenium script to auto-fill a contact form, like this one, and yeah, obviously the main site is different — cornerstonesalina.com/elements/contact-form/, there’s a math captcha like &...
2
votes
1
answer
96
views
NumPy generate a 2d linear array using multiple values
So I'm trying to generate a map for a personal project using opensimplex noise, multiple layers etc.
My problem is that I want to recreate the equator to combine with a temperature map to obviously ...
2
votes
1
answer
137
views
What does <string>:2(__init__) have to do with mathematical computations?
I'm in the process of writing some mathematical operations. Here's a sample program to give you an idea of what kind of thing I could be doing:
from dataclasses import dataclass
import random
@...
2
votes
0
answers
63
views
Having problems computing PDE Residuals
I'm computing PDE residuals for The_Well datasets (e.g. turbulent_radiative_layer_2D and shear_flow) using finite differences, but the residuals are much larger than I expect. The data are generated ...
3
votes
1
answer
77
views
How can I shortcut the unlimited-time SymPy expansion of all (a + b*z**k) given some z(n)?
Let me put some context first.
You see, I have a theory that multiplying all (a + b*z**k), for a determined z based on n, and some exponents k, it could return a**n+b**n. This is my brand new Cori ...
9
votes
3
answers
327
views
How to find the longest elementary path in a graph?
The problem is to find the longest sequence of numbers from 1 to 100 such that each number is either multiple or divisor or the previous, and with no repetition. For example, 50 25 5 35 7 63 21 is a ...
0
votes
0
answers
97
views
Strange black borders on count changes with cmath on my python fractal render
I recently wrote a program which renders the mandelbrot set and encountered some irrelevent issues, which some helpful users solved for me. One user reccommended I change an aspect of my code for ...
-4
votes
1
answer
124
views
Pygame image not facing the mouse [duplicate]
Here is my rotating code:
pos = pygame.mouse.get_pos()
x_dist = pos[0] - self.rect.centerx
y_dist = -(pos[1] - self.rect.centery)
self.angle = math.degrees(math.atan2(y_dist, x_dist))
self.image = ...
6
votes
1
answer
143
views
What is wrong with my block GMRES implementation?
I'm trying to implement a block GMRES procedure (i.e., GMRES to solve Ax=b, but with b that is not a vector but a n x r matrix, where r << n). My goal is to have a first implementation in Python ...
3
votes
1
answer
102
views
How large of an integer can Python 3 support on a 64-bit system with N gigabytes of RAM?
I know that Python 3 supports arbitrary precision arithmetic and so the common answer in all the materials that I have ever seen regarding this topic has been: "The only constraint is the ...