All Questions
5
questions
4
votes
1
answer
63
views
Array Math to Calculate Ice Thickness -- Need Help Simplifying
I posted this on Stack but since it's working code, it was suggested I post it here. I wrote this code to calculate ice thickness using the following equation from Stephenson, 2011.
It's a daily ...
1
vote
1
answer
52
views
Optimizing the Dig Pow function
I have written a Python function to solve the Dig Pow problem, where the goal is to find a number k such that the sum of each digit of n raised to a specific and ...
2
votes
2
answers
775
views
Finding distance between vectors of matrices
So here is the problem:
Given 2D numpy arrays 'a' and 'b' of sizes n×m and k×m
respectively and one natural number 'p'. You need to find the
distance(Euclidean) of the rows of the matrices 'a' and ...
4
votes
1
answer
312
views
Simulated annealing for magic square-of-squares puzzle
I'm working on a function that takes in a NumPy array containing only mutually distinct positive square numbers. I want the function to pick an element at random, find if there is a lower positive ...
5
votes
0
answers
297
views
Summing 2D NumPy array by multiple labels [closed]
Each element of the array is a coordinate (x, y).
Each coordinate has two labels.
Goal:
sum the elements that have the same two labels.
How can ...