Looking the “Array” section in the bash(1) man page, I didn’t find a way to slice an array. So I came up with this overly complicated function: #!/bin/bash #...
  • May 25, 2022
  • 0 Comments
I stumbled onto this neat shortcut for converting a DOM NodeList into a regular array, but I must admit, I don’t completely understand how it works: .slice.call(document.querySelectorAll('a'), 0) So...
  • May 25, 2022
  • 0 Comments
What are the most common pandas ways to select/filter rows of a dataframe whose index is a MultiIndex? Slicing based on a single value/label Slicing based on multiple labels...
  • May 22, 2022
  • 0 Comments
This Python code: import numpy as p def firstfunction(): UnFilteredDuringExSummaryOfMeansArray = MeanOutputHeader=['TestID','ConditionName','FilterType','RRMean','HRMean', 'dZdtMaxVoltageMean','BZMean','ZXMean','LVETMean','Z0Mean', 'StrokeVolumeMean','CardiacOutputMean','VelocityIndexMean'] dataMatrix = BeatByBeatMatrixOfMatrices[column] roughTrimmedMatrix = p.array(dataMatrix[1:,1:17]) trimmedMatrix = p.array(roughTrimmedMatrix,dtype=p.float64) #ERROR THROWN HERE myMeans =...
  • May 20, 2022
  • 0 Comments