Skip to content

Tag: numpy

Add in-between steps into array of numbers (Python)

I am looking for some function that takes an input array of numbers and adds steps (range) between these numbers. I need to specify the length of the output’s array. Example: Result: Is there something like that, in Numpy for example? I have a prototype of this function that uses dividing input array in…

Outer product of large vectors exceeds memory

I have three 1D vectors. Let’s say T with 100k element array, f and df each with 200 element array: For each element array, I have to calculate a function such as the following: My first instinct was to use the NumPy outer to find the function with each combination of f and df However, in this case, I a…

Compare values within a certain timeframe in arrays

I am trying to compare values (0’s and 1’s) in a array. I want to search for each “1” that appears in one column, for another “1” in the other column in a specific timeframe (for example, 5 seconds, 10 seconds, etc.). I will call the 1’s as “signals”. In e…