Created
August 12, 2020 15:36
-
-
Save Steboss/efb791e9d5a2498240a6f98c1e31230d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#translate the pointer to a numpy array | |
magnitude_array = np.asarray(magnitude) | |
#reshape the magnitude_array so we'll have a matrix | |
cols = int( (length/(windowSize/2)) -1) | |
rows = int(windowSize/2)+1 | |
new_array = np.zeros([cols,rows]) | |
counter = 0 | |
for i in range(0,cols): | |
for j in range(0,rows): | |
new_array[i][j] = magnitude_array[counter] | |
counter+=1 | |
return new_array |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment