Skip to content

Tag: data-structures

Dictionary of np arrays

I am working on a load function that loads files containing one pandas dataframe per file (or even better one np array). I.e. I am loading a .csv file and I want to link it to only one array variable. This function takes as input one dictionary containing the name I want (as key) the variable to take and the

Build tree/linked list from a list of Objects

I am trying to build a tree like hierarchy from modules and their respective submodules, each module has a name, data, and a list of its submodules, With this code I’m able to detect if something is a submodule of something else but I don’t know how I am supposed to form the connections/build the data structure. My desired output

Efficiently search a long list of lists

I have a long list of hexahedral point coordinates, for example: Each row defines a hexahedron cell, and by iterating over each cell, I extract the defining faces of the cell (6 faces), and add each face to a list processed_faces All of this is fine, but because some cells are sharing the same face, I needed a way to