Skip to content

Missing import for reshape #36

Description

@afreyer

Hi there,

For the method larExtrude, it uses the function reshape. It seems like it is not imported from numpy. Is it correct that the import is not there?

def larExtrude(model, pattern):
    """Multidimensional extrusion
    model is a LAR model: a pair (vertices, cells)
    pattern is a list of positive and negative sizes (multi-extrusion)

    Return a "model"
    """
    V, FV = model
    d, m = len(FV[0]), len(pattern)
    coords = list(cumsum([0] + (AA(ABS)(pattern))))
    offset, outcells, rangelimit = len(V), [], d * m
    for cell in FV:
        tube = [v + k * offset for k in range(m + 1) for v in cell]
        cellTube = [tube[k : k + d + 1] for k in range(rangelimit)]
        outcells += [reshape(cellTube, newshape=(m, d, d + 1)).tolist()]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions