Project structure for a reactor model built in Python

Problem I use Python for various computational reactor modeling activities. While there are many components to the models I develop, […]

Converting a 1D Array of Strings to a 2D Array in Python

Problem I was solving this question on a site that gives you a 1d array called grid grid = [‘top […]

Backpropagation in simple Neural Network

Problem I’ve been working on a simple neural network implemented in python. Currently, it seems to be learning, but unfortunately […]

Organization of complex empirical equations

Problem I am working on coding up a set of models that are based on empirical models. These models tend […]

Can this numpy code be vectorized?

Problem I’ve written the following function to produce n realizations of a CIR process for a given set of parameters: […]

Centre all columns of an array

Problem I have this working code tested over lots of np.arrays. It is a for-loop that walks through all the […]

Peak finding algorithm

Problem This is my peak finding algorithm. I try to split the 2D array in half and find the maximum […]

Find the intervals which have a non-empty intersection with a given interval

Problem The problem is the following: I have a list intervals which consists of tuples of the form (start, end) […]

Python function that shears image by n degrees while keeping the relationship between height and width

Problem I am trying to find a method to shear/skew an image horizontally or vertically by n degrees (n ranges […]

Ensuring performance of sketching/streaming algorithm (countSketch)

Problem I have implemented what is know as a countSketch in Python (page 17: https://arxiv.org/pdf/1411.4357.pdf) but my implementation is currently […]